__setattr__/__getattr__
Oleg Orlov
orlov at diasoft.ru
Fri Mar 24 00:41:50 EST 2000
>From tutorial 9.6
>
>There is limited support for class-private identifiers. Any identifier
>of the form __spam (at least two leading underscores, at most one
>trailing underscore) is now textually replaced with _classname__spam,
>where classname is the current class name with leading underscore(s)
>stripped.
There is no such replacement inside ordinary methods of the class!
Why __setattr__ is extraordinary?
-----------
Oleg Orlov
More information about the Python-list
mailing list