[issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name

Ethan Furman report at bugs.python.org
Mon Sep 14 16:26:29 EDT 2020


Ethan Furman <ethan at stoneleaf.us> added the comment:

Looks like the `re` module's flags have been updated separately in issue36548:

  >>> import re
  >>> re.I
  re.IGNORECASE

  >>> print(re.I)
  # should also be re.IGNORECASE

  >>> re.I|re.S|re.X
  re.IGNORECASE|re.DOTALL|re.VERBOSE


For stdlib Enum conversions are we happy with that?  Or should __str__ just print the numeric value?

----------
nosy: +ezio.melotti, mrabarnett, serhiy.storchaka
versions: +Python 3.10 -Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40066>
_______________________________________


More information about the Python-bugs-list mailing list