[issue40066] Enum: modify __repr__, __str__; update docs
Michael Cuthbert
report at bugs.python.org
Wed Jun 30 14:59:25 EDT 2021
Michael Cuthbert <cuthbert at mit.edu> added the comment:
It may be helpful for the enum module to come with transitional functions like "pre310_str()" "pre310_repr()" "pre310_flag_str()" etc. so that people who are writing doctests that need to function on both < 3.10 and 3.10+ can temporarily do a "Enum.__str__ = pre310_str" in their test suites (and of course restore it later) until <=3.9 is no longer supported. Otherwise everyone with doctest suites will be doing this ourselves.
----------
nosy: +mscuthbert
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40066>
_______________________________________
More information about the Python-bugs-list
mailing list