Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Enum] attributes of mixed-in classes can be shadowed by other members #103596

Closed
Assignees
ethanfurman
Labels
3.10only security fixes3.11only security fixes3.12only security fixes3.7 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@ethanfurman

Description

@ethanfurman

As mentioned in#101273 , when mixing data types into an enum, the data type's methods can be lost:

fromenumimportStrEnum,autoclassBook(StrEnum):author=auto()title=auto()isbn=auto()Book.author# <Book.author: 'author'>Book.author.title()# book object not callable exception, but 'Author' is expected

Linked PRs

Metadata

Metadata

Assignees

Labels

3.10only security fixes3.11only security fixes3.12only security fixes3.7 (EOL)end of life3.8 (EOL)end of life3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp