Python 2.2 properties

Michael Chermside mcherm at destiny.com
Wed Jan 16 09:48:17 EST 2002


> Mark McEahern wrote:
>> > Given these suggestions, I'd probably suggest something like this:
>> > """property only works with new-style classes.  There are two ways to write
>> a new style class:
>> > 1.  Derive your class directly from object.
>> 2.  Derive from a class that derives from object (e.g., list)."""
>> > Or you could collapse 2 into 1:
>> > Derive your class either directly or indirectly from object.
> 
> To a programmer who understands object-oriented programming,
> I would think saying both is redundant.  Subclasses are 
> subclasses, and implement or override the features of their
> ancestors, no matter how far descended.


Yes, but the Python documentation should be intended for beginners as 
well as experienced programmers. So let's lay it out in full for them.

C-P-4-programmers-who-understand-object-oriented-programming-ly yours,

-- Michael Chermside






More information about the Python-list mailing list