ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
[Tutor] New-style classes
by Jan Eden other posts by this author
Sep 29 2005 1:11AM messages near this date
Re: [Tutor] Generalising system processes | Re: [Tutor] New-style classes
Hi,

after updating a program to use new-style classes, I am a bit confused. My setup looks like 
this (simplified):

#Show.py

import Data

class Base(object):
    ...
    
class Page(Data.Page, Base):
    ...

class Author(Data.Author, Base):
...

#Data.py

class Base:
    ...

class Page(Base):
    ...

class Author(Base):
    ...

The module Show.py provides methods, Data.py provides data attributes. I use the property me
thod in Data.Base for a certain attribute - but why does this work?

Data.Base has no base classes, so it is not based on a built-in type: How can it be a new-st
yle class?

Thanks for any hints,

Jan
-- 
There are 10 kinds of people:  those who understand binary, and those who don't
_______________________________________________
Tutor maillist  -  Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor
Thread:
Jan Eden
Kent Johnson
Jan Eden
Kent Johnson

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved