[Eli] >> It is applicable, in the sense that os.O_CREAT etc can be IntEnum values. >> Their bitset operation results will be simple integers. It's not planned to >> add a special enum for this - this was ruled against during the Pycon >> discussions. On Sat, Apr 13, 2013 at 7:30 AM, Serhiy Storchaka <storchaka at gmail.com> wrote: > But IntEnum is useless in such cases because a resulting mask will be an > integer an will lost its convenient printable representation. There is > almost no benefit of IntEnum before int constant. If you really wanted that you could define an int subclass that does better and use that -- IntEnum is just one example of how you can override the value type of Enum. (And yes, I am now +1 on documenting this mechanism.) -- --Guido van Rossum (python.org/~guido)
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