Thanks for this Ethan. I don't have any substantive comments on what you're proposing (aside from "Yes, that sounds reasonable to me"), so my comments below are just some minor suggested clarifications for the PEP text.
On Wed, 21 Jul 2021 at 14:17, Ethan Furman <[email protected]> wrote: > IntEnum, IntFlag, and StrEnum should be as close to a drop-in replacement of > existing integer and string constants as is possible. Towards that goal, the > str() output of each should be its inherent value; i.e.:: > > >>> Color.RED > <Color.RED: 1> > >>> str(Color.RED) > 1 > >>> format(Color.RED) > '1' The suggested output here looks like the second line was `print(Color.RED)` rather than `str(Color.RED)` (since the quotes on the string are missing). The text should also state explicitly that `Color` in the example is an `IntEnum` subclass. > Note that format() already produces the correct output, only str() needs > updating. This paragraph may be a little clearer if it said "... correct output in Python 3.10, only str() ...". > Using the above enumerations, the following table shows the old and new > behavior, while the last shows the final result: Since the enum output changes were reverted for 3.10, replacing "3.9" with "3.10" in the tables may make it a little clearer that there was no intermediate step between 3.9 and 3.11. Cheers, Nick. -- Nick Coghlan | [email protected] | Brisbane, Australia _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/YF5QU23VJRVJINKXEPXHUI35WH5ZLDIF/ Code of Conduct: http://python.org/psf/codeofconduct/
