[Python-3000] Removing __var

Fred L. Drake, Jr. fdrake at acm.org
Fri Sep 22 19:29:17 CEST 2006


On Friday 22 September 2006 13:05, Christian Tanzer wrote:
 > 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.

This also doesn't work if two classes in the inheritance hierarchy have the 
same __name__, if I understand how you're using this.  My guess is that 
you're using calls like

    def doSomething(self, arg):
        self.__super.doSomething(arg + 1)


  -Fred

-- 
Fred L. Drake, Jr.   <fdrake at acm.org>


More information about the Python-3000 mailing list