Skip to content

bpo-31801: Enum: add _ignore_ as class option#5237

Merged
ethanfurman merged 7 commits into
python:masterfrom
ethanfurman:enum_ignore
Jan 22, 2018
Merged

bpo-31801: Enum: add _ignore_ as class option#5237
ethanfurman merged 7 commits into
python:masterfrom
ethanfurman:enum_ignore

Conversation

@ethanfurman

@ethanfurman ethanfurman commented Jan 18, 2018

Copy link
Copy Markdown
Member

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.

https://bugs.python.org/issue31801

_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.
@ethanfurman ethanfurman self-assigned this Jan 18, 2018
@csabella

Copy link
Copy Markdown
Contributor

Should this be added to the documentation?

@ethanfurman

ethanfurman commented Jan 19, 2018 via email

Copy link
Copy Markdown
Member Author

Comment thread Doc/library/enum.rst

- ``_missing_`` -- a lookup function used when a value is not found; may be
overridden
- ``_ignore_`` -- a list of names, either as a :func:`list` or a :func:`str`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be added to the version added section just below this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ethanfurman ethanfurman merged commit a4b1bb4 into python:master Jan 22, 2018
@ethanfurman

Copy link
Copy Markdown
Member Author

Thank you, @csabella, for the help!

@ethanfurman ethanfurman deleted the enum_ignore branch April 5, 2018 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants