[issue23751] Allow reverse lookup (value-to-member) for Enum sublcasses decorated with @enum.unique

2015-03-23 Thread Mohith
Mohith added the comment: Doh! That works. And it was in the documentation too. Silly me. Apologies for opening an issue, and thanks for showing me the way! -- resolution: -> works for me status: open -> closed ___ Python tracker

[issue23751] Allow reverse lookup (value-to-member) for Enum sublcasses decorated with @enum.unique

2015-03-23 Thread Mohith
New submission from Mohith: Addendum to issue 18042. I've had a use case where I wanted to allow reverse lookups (i.e. value-to-member lookup) for my enum.Enum that was decorated via @enum.unique. In such a case, I would add my own class method that performs the logic. E.g. an unopti