inheriting type or object?
Fabiano Sidler
fabianosidler at gmail.com
Thu Apr 27 17:07:34 EDT 2006
Hi folks!
As stated in subject, how do I decide wether to inherit <type 'type'> or
<type 'object'>? Whenever I want to intantiate my derived type, I taked
<type 'type'> here, but inheriting from <type 'object'> consequently would
be reasonable in cases of pure static objects (i.e. objects/types using
staticmethods exclusively), for whose I would prefer toplevel code outside
a class definition in python, since python does not oblige programmers to
use classes (like JAVA et. al.).
So, finally, my question is: Is there a design pattern, that makes
<type 'object'> a reasonable (direct) base type for new objects/types?
Right now, I can't see any.
Thank you for answering!
Greetings,
F. Sidler
More information about the Python-list
mailing list