Author doerwalter
Recipients doerwalter
Date 2018-08-20.16:34:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za>
In-reply-to
Content
The __repr__ output of an enum class should use __qualname__ instead of __name__. The following example shows the problem:

import enum

class X:
   class I:
      pass

class Y:
   class I(enum.Enum):
      pass

print(X.I)
print(Y.I)

This prints:

<class '__main__.X.I'>
<enum 'I'>

I would have expected it to print

<class '__main__.X.I'>
<enum 'Y.I'>

or even for maximum consistency

<class '__main__.X.I'>
<enum '__main__.Y.I'>
History
Date User Action Args
2018-08-20 16:34:28doerwaltersetrecipients: + doerwalter
2018-08-20 16:34:28doerwaltersetmessageid: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za>
2018-08-20 16:34:28doerwalterlinkissue34443 messages
2018-08-20 16:34:27doerwaltercreate