On Tuesday 21 March 2006 18:47, Thierry FLORAC wrote:
> Of course, I'm not sure to really understand the difference between this
> code and the previous one, and why this "object" inheritance is so
> important (I've always thought that every Python class was automatically
> inheriting from "object").
> So any kind of explanation would be really welcome !

First rule: Always inherit from ``object``!!!

Now the explanation. Python has the concept of old and new style classes. When 
inheriting ``object``, you declare a class to be a new style class. New style 
classes were introduced to allow for great new features, such as 
meta-classes, descriptors, and (for you most importantly) properties. :-)

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to