summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-34282: Remove deprecated enum _convert method (GH-13823)Zachary Ware2019-06-041-6/+0
|
* bpo-35899: Fix Enum handling of empty and weird strings (GH-11891)Brennan D Baraban2019-03-031-8/+9
| | | | | | | | | | Co-authored-by: Maxwell <maxwellpxt@gmail.com> Co-authored-by: Stéphane Wirtel <stephane@wirtel.be> https://bugs.python.org/issue35899
* bpo-35717: Fix KeyError exception raised when using enums and compile (GH-11523)Rémi Lapeyre2019-01-241-1/+1
| | | https://bugs.python.org/issue17467
* Speed-up building enums by value, e.g. http.HTTPStatus(200) (#11318)Andrew Svetlov2018-12-261-2/+4
| | | bpo-35585: Speed up enum by-value lookup
* bpo-34909: keep searching mixins until base class is found (GH-9737)Ethan Furman2018-10-061-3/+1
|
* bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328)Ethan Furman2018-09-221-31/+19
| | | * bpo-29577: allow multiple mixin classes
* bpo-34536: raise error for invalid _missing_ results (GH-9147)Ethan Furman2018-09-121-1/+19
| | | * raise exception if _missing_ returns None or invalid type
* bpo-34282: Fix Enum._convert shadowing members named _convert (GH-8568)orlnub1232018-09-121-38/+45
| | | | | * Fix enum members getting shadowed by parent attributes * Move Enum._convert to EnumMeta._convert_ * Deprecate _convert
* bpo-33217: Raise TypeError for non-Enum lookups in Enums (GH-6651)Rahul Jha2018-09-101-1/+7
| | | * bpo-33217: Raise TypeError for non-Enum lookups in Enums
* bpo-33866: enum: Stop using OrderedDict (GH-7698)INADA Naoki2018-06-181-13/+5
|
* bpo-31947: remove None default for names param in Enum._create_ (GH-4288)anentropic2018-04-161-1/+1
|
* bpo-31801: Enum: add _ignore_ as class option (#5237)Ethan Furman2018-01-221-1/+19
| | | | | | | | | | | | | | | | * bpo-31801: Enum: add _ignore_ as class option _ignore_ is a list, or white-space seperated str, of names that will not be candidates for members; these names, and _ignore_ itself, are removed from the final class. * bpo-31801: Enum: add documentation for _ignore_ * bpo-31801: Enum: remove trailing whitespace * bpo-31801: Enum: fix bulleted list format * bpo-31801: add version added for _ignore_
* bpo-30152: Reduce the number of imports for argparse. (#1269)Serhiy Storchaka2017-09-251-7/+4
|
* Spelling fixes (#2902)Ville Skyttä2017-08-031-1/+1
|
* bpo-30616: Functional API of enum allows to create empty enums. (#2304)Dong-hee Na2017-06-211-1/+1
| | | | | | | | * bpo-30616: Functional API of enum allows to create empty enums. * Update NEWS move addition to avoid conflict
* closes issue29167: fix race condition in (Int)FlagEthan Furman2017-01-241-4/+11
|
* Issue #29103: Remove unused import. Noticed by Jean-Sebastien Bevilacqua.Raymond Hettinger2016-12-301-1/+1
|
* close issue28172: Change all example enum member names to uppercase, per ↵Ethan Furman2016-11-211-2/+2
| | | | Guido; patch by Chris Angelico.
* issue23591: fix flag decomposition and reprEthan Furman2016-09-181-58/+94
|
* Enum._convert: sort by value, then by nameEthan Furman2016-09-111-3/+10
|
* issue23591: add auto() for auto-generating Enum member valuesEthan Furman2016-09-111-13/+37
|
* issue23591: more docs; slight change to reprEthan Furman2016-09-041-8/+5
|
* issue23591: bool(empty_flags) == False; more docs & testsEthan Furman2016-09-021-0/+3
|
* issue23591: optimize _high_bit()Ethan Furman2016-09-021-7/+2
|
* issue23591: add docs; code cleanup; more testsEthan Furman2016-09-021-4/+4
|
* issue23591: add Flags, IntFlags, and testsEthan Furman2016-08-311-10/+217
|
* issue26981: add _order_ compatibility shim to enum.EnumEthan Furman2016-08-201-2/+15
|
* Issue26988: remove AutoEnumEthan Furman2016-08-201-122/+13
|
* Add AutoEnum: automatically provides next value if missing. Issue 26988.Ethan Furman2016-08-051-13/+122
|
* signal, socket, and ssl module IntEnum constant name lookups now return aGregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)2016-06-031-2/+8
| | | | | | | | consistent name for values having multiple names. Ex: signal.Signals(6) now refers to itself as signal.SIGALRM rather than flipping between that and signal.SIGIOT based on the interpreter's hash randomization seed. This helps finish issue27167.
* issue26893: use mro() to examine class heirarchyEthan Furman2016-05-011-1/+1
|\
| * issue26893: use mro() to examine class heirarchyEthan Furman2016-05-011-1/+1
| |
* | Issue26748: Enum classes should evaluate as TrueEthan Furman2016-04-141-0/+6
|\ \ | |/
| * Issue26748: Enum classes should evaluate as TrueEthan Furman2016-04-141-0/+6
| |\
| | * Issue26748: Enum classes should evaluate as TrueEthan Furman2016-04-141-0/+6
| | |
| | * issue23673Ethan Furman2015-03-191-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | add private method to enum to support replacing global constants with Enum members: - search for candidate constants via supplied filter - create new enum class and members - insert enum class and replace constants with members via supplied module name - replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle modify IntEnum classes to use new method
* | | revert change 87a9dff5106c: pure Enum members again evaluate to True;Ethan Furman2016-01-151-3/+0
| | | | | | | | | | | | | | | update Finer Points section of docs to cover boolean evaluation; add more tests for pure and mixed boolean evaluation
* | | Issue #23883: Add missing APIs to __all__; patch by Jacek KołodziejMartin Panter2015-11-141-1/+1
| | |
* | | Issue 25147: add reason for using _collectionsEthan Furman2015-09-181-0/+1
| | |
* | | Close issue25147: use C implementation of OrderedDictEthan Furman2015-09-181-1/+6
| | |
* | | Close issue24840: Enum._value_ is queried for bool(); original patch by Mike ↵Ethan Furman2015-09-181-0/+3
|/ / | | | | | | Lundy
* | Close issue23900: add default __doc__ to new enumerations that do not ↵Ethan Furman2015-04-121-0/+4
| | | | | | | | specify one.
* | issue23673Ethan Furman2015-03-191-0/+26
| | | | | | | | | | | | | | | | | | add private method to enum to support replacing global constants with Enum members: - search for candidate constants via supplied filter - create new enum class and members - insert enum class and replace constants with members via supplied module name - replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle modify IntEnum classes to use new method
* | Close issue23486: performance boost for enum member lookupEthan Furman2015-03-111-1/+10
| |
* | Issue22506: remove name & value from __dir__ as they now show up automaticallyEthan Furman2014-10-211-2/+1
| |
* | Issue22506: merge from 3.4Ethan Furman2014-10-141-1/+6
|\ \ | |/
| * Issue22506: added methods on base Enum class now show up in dir of Enum ↵Ethan Furman2014-10-141-1/+6
| | | | | | | | subclass (3.4)
* | Close issue21706: add 'start' parameter to functional APIEthan Furman2014-09-171-8/+8
|/
* consistently use _name_ and _value_; patch from Kiss GyorgyEthan Furman2014-09-171-5/+5
|
* Close issue20653: improve functional API docs; minor code changesEthan Furman2014-03-031-12/+27
|