[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
|