Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enum] make some private attributes public #112328

Closed
ethanfurman opened this issue Nov 23, 2023 · 2 comments
Closed

[Enum] make some private attributes public #112328

ethanfurman opened this issue Nov 23, 2023 · 2 comments
Assignees
Labels
3.13 new features, bugs and security fixes docs Documentation in the Doc dir stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@ethanfurman
Copy link
Member

ethanfurman commented Nov 23, 2023

Feature or enhancement

Make _EnumDict, _EnumDict._member_names, and possibly other private names public.

This is to make subclassing EnumType and other advanced behavior supported, such as having multiple values per member.

Linked PRs

@ethanfurman ethanfurman added type-feature A feature request or enhancement stdlib Python modules in the Lib dir 3.13 new features, bugs and security fixes labels Nov 23, 2023
@ethanfurman ethanfurman self-assigned this Nov 23, 2023
@ethanfurman ethanfurman added the docs Documentation in the Doc dir label Nov 23, 2023
ethanfurman added a commit that referenced this issue Dec 5, 2023
* [Enum] Make some private attributes public.

- ``_EnumDict`` --> ``EnumDict``
- ``EnumDict._member_names`` --> ``EnumDict.member_names``
- ``Enum._add_alias_``
- ``Enum._add_value_alias_``

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@hugovk
Copy link
Member

hugovk commented Dec 11, 2023

The PR has been merged, shall we close this, or is there more to do?

@ethanfurman
Copy link
Member Author

Closing, thanks for the reminder.

aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
…H-112514)

* [Enum] Make some private attributes public.

- ``_EnumDict`` --> ``EnumDict``
- ``EnumDict._member_names`` --> ``EnumDict.member_names``
- ``Enum._add_alias_``
- ``Enum._add_value_alias_``

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 new features, bugs and security fixes docs Documentation in the Doc dir stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants