Message365019
Serhiy had the idea of having Enum._convert also modify the __str__ and __repr__ of newly created enumerations to display the module name instead of the enumeration name (https://bugs.python.org/msg325007):
--> socket.AF_UNIX
<AddressFamily.AF_UNIX: 1> ==> <socket.AF_UNIX: 1>
--> print(socket.AF_UNIX)
AddressFamily.AF_UNIX ==> socket.AF_UNIX
Thoughts? |
|
| Date |
User |
Action |
Args |
| 2020-03-25 19:48:58 | ethan.furman | set | recipients:
+ ethan.furman, barry, eli.bendersky |
| 2020-03-25 19:48:58 | ethan.furman | set | messageid: <[email protected]> |
| 2020-03-25 19:48:58 | ethan.furman | link | issue40066 messages |
| 2020-03-25 19:48:58 | ethan.furman | create | |
|