Stephen J. Turnbull writes: > _nameToLevel = { member.name : member for member in LogLevel }
Urk, premature expostulation there (not sure how it happened, I know I fixed that line before sending...). Just _nameToLevel = LogLevel.__members__ is fine here (LogLevel is an IntEnum, __members__ is a name : member view). In fact, often better in general: if there were aliases, that would catch all of the names, while the comprehension only catches the canonical names. Which is why I bother correcting myself. Steve _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/54WR7BKMIWMJVINK4T3WIQU6D5EPRXGN/ Code of Conduct: http://python.org/psf/codeofconduct/