10000 gh-114803: Mention that `@dataclass` should not be applied on enums by sobolevn · Pull Request #114891 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-114803: Mention that @dataclass should not be applied on enums #114891

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

Merged
merged 5 commits into from
Feb 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Doc/howto/enum.rst
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
  • Loading branch information
sobolevn and Eclips4 authored Feb 2, 2024
commit d0d13a72a42f30c1626bfe2e29781e408f2ff97f
2 changes: 1 addition & 1 deletion Doc/howto/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ to use the standard :func:`repr`.

.. note::

Adding :func:`~dataclasses.dataclass` decorator to :type:`Enum`
Adding :func:`~dataclasses.dataclass` decorator to :class:`Enum`
and its subclasses is not supported. It will not raise any errors,
but it will produce very strange results at runtime::

Expand Down
0