Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.8] bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) #26654

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

Closed

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 10, 2021

This enables, for example, two base Enums to both inherit from str, and then both be mixed into the same final Enum:

class Str1Enum(str, Enum):
    GH- some behavior here

class Str2Enum(str, Enum):
    GH- some more behavior here

class FinalStrEnum(Str1Enum, Str2Enum):
    GH- this now works

(cherry picked from commit 8a4f085)

Co-authored-by: Ethan Furman [email protected]

https://bugs.python.org/issue44356

… same (pythonGH-26649)

This enables, for example, two base Enums to both inherit from `str`, and then both be mixed into the same final Enum:

    class Str1Enum(str, Enum):
        GH- some behavior here

    class Str2Enum(str, Enum):
        GH- some more behavior here

    class FinalStrEnum(Str1Enum, Str2Enum):
        GH- this now works
(cherry picked from commit 8a4f085)

Co-authored-by: Ethan Furman <[email protected]>
@miss-islington
Copy link
Contributor Author

@ethanfurman: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@ethanfurman: Status check is done, and it's a success ✅ .

@ethanfurman
Copy link
Member

3.8 is now in security maintenance mode.

@miss-islington miss-islington deleted the backport-8a4f085-3.8 branch June 10, 2021 20:40
elbehery95 added a commit to elbehery95/mypy that referenced this pull request Feb 20, 2023
elbehery95 added a commit to elbehery95/mypy that referenced this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants