[issue12370] Use of super overwrites use of __class__ in class namespace

Eric Snow report at bugs.python.org
Fri Sep 7 19:00:35 CEST 2012


Eric Snow added the comment:

Wouldn't the following also start working (currently a NameError)?

  class X:
      def f(self):
          print(f.__qualname__)
      def g(self):
          f(None)

  X().f()
  X().g()

How about this[1] (also currently a NameError):

  class Outer:
     class Inner:
         class Worker:
             pass
         class InnerSubclass(Inner):
             class Worker(Inner.Worker):
                 pass

I wouldn't mind the semantic change, but it would be a change nonetheless.


[1] See http://mail.python.org/pipermail/python-list/2011-April/601605.html

----------
nosy: +eric.snow

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12370>
_______________________________________


More information about the Python-bugs-list mailing list