[Python-3000] Removing __var

Christian Tanzer tanzer at swing.co.at
Fri Sep 22 19:05:51 CEST 2006


"Raymond Hettinger" <rhettinger at ewtllc.com> wrote:

> I propose dropping the __var private name mangling trick for
> double-underscores.
>
> It is rarely used; it smells like a hack; it complicates instrospection
> tools; it's not beautiful; and it is not in line with Python's spirit of
> "we're all consenting adults".

It is useful in some situations, though. In particular, I use a
metaclass that sets `__super` to the right value. This wouldn't work
without name mangling.

-- 
Christian Tanzer                                    http://www.c-tanzer.at/



More information about the Python-3000 mailing list