get/set
Steve Holden
sholden at holdenweb.com
Fri May 10 13:46:50 EDT 2002
"William Dode" <wilk at flibuste.net> wrote in message
news:20020510192720.0823ed15.wilk at flibuste.net...
> Le Fri, 10 May 2002 12:03:53 -0500
> "Mark McEahern" <marklists at mceahern.com> écrivait:
>
[property explanation]
> it means that if i want to keep working with python 2.1 i need to use my
> own get/set method ?
>
[property code]
Not at all: the bahavior Mark explains is only implemented when the class
derives from "object" - a so-called "new-style" class. If there is no such
derivaqtion ("classic" classes) then the behavior is just as it's always
been.
The advantage is that one can create ones own subclasses of the built-in
types from 2.2 onwards.
regareds
Steve
More information about the Python-list
mailing list