Understanding properties
Sean 'Shaleh' Perry
shalehperry at attbi.com
Sat Jul 6 13:39:20 EDT 2002
On 06-Jul-2002 merman wrote:
>> class MyObject(object):
>
> Why it needs the inheritance from object - I don't understand.
>
> Can you enlighten me please?
>
deriving from 'object' causes the class to be a new style python 2.2+ class.
This enables the properties code. If you do not derive from object python
creates a class just like it always has, with no new features.
More information about the Python-list
mailing list