[Tutor] New-style classes

Jan Eden lists at janeden.org
Thu Sep 29 10:11:16 CEST 2005


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 method 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-style class?

Thanks for any hints,

Jan
-- 
There are 10 kinds of people:  those who understand binary, and those who don't


More information about the Tutor mailing list