8000 gh-90562: Mention slots pitfall in dataclass docs by thejcannon · Pull Request #107391 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-90562: Mention slots pitfall in dataclass docs #107391

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 10 commits into from
May 21, 2024
Prev Previous commit
Next Next commit
Merge branch 'main' into patch-1
  • Loading branch information
thejcannon authored May 19, 2024
commit e6b366981099589e8eeb617f8b57362545d02732
2 changes: 1 addition & 1 deletion Doc/library/dataclasses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Module contents

- *slots*: If true (the default is ``False``), :attr:`~object.__slots__` attribute
will be generated and new class will be returned instead of the original one.
If :attr:`~object.__slots__` is already defined in the class, then :exc:`TypeError`
If :attr:`!__slots__` is already defined in the class, then :exc:`TypeError`
is raised. Calling no-arg :func:`super` in dataclasses using ``slots=True`` will result in
the following Exception being raised:
``TypeError: super(type, obj): obj must be an instance or subtype of type``.
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0