Browse Source
bpo-31801: Enum: add _ignore_ as class option (#5237)
bpo-31801: Enum: add _ignore_ as class option (#5237)
* 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_pull/5256/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 79 additions and 2 deletions
-
26Doc/library/enum.rst
-
20Lib/enum.py
-
33Lib/test/test_enum.py
-
2Misc/NEWS.d/next/Library/2018-01-18-13-47-40.bpo-31801.3UGH1h.rst
@ -0,0 +1,2 @@ |
|||
Add ``_ignore_`` to ``Enum`` so temporary variables can be used during class |
|||
construction without being turned into members. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue