super - is (should) it (be) a reserved word?

Alex Martelli aleaxit at yahoo.com
Tue Oct 10 07:40:16 EDT 2000


<jay.krell at cornell.edu> wrote in message
news:mailman.971170103.16530.python-list at python.org...
> What do the leading underscores do? In my example I was sure to use three

If a class attribute or instance attribute name starts with __ (two leading
underscores) but does NOT end with __ (two trailing underscores), then
Python internally transforms this name to start with _Classname_.  This
ensures against accidental clashes between attribute names for base and
derived classes.


Alex






More information about the Python-list mailing list