On 13.04.13 03:13, Glenn Linderman wrote: > On 4/12/2013 3:59 PM, Guido van Rossum wrote: >> class Insect(Enum): >> wasp = 1 >> bee = 1 >> ant = 2 >> >> We'd have Insect.wasp == Insect.bee < Insect.ant but Insect.wasp is >> not Insect.bee. > > can't define two names in the same enum to have the same value, per the > PEP. For current flufl.enum implementations this requires values to be hashable. An alternative implementation can use comparability (which already required for repr() and iteration).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4