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

Appearance settings

Commit a3db4e8

Browse filesBrowse files
[3.12] gh-108267: Fix object.__setattr__ regression in dataclasses docs (GH-119082) (#119098)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
1 parent 0a761ca commit a3db4e8
Copy full SHA for a3db4e8

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

‎Doc/library/dataclasses.rst

Copy file name to clipboardExpand all lines: Doc/library/dataclasses.rst
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,8 @@ methods will raise a :exc:`FrozenInstanceError` when invoked.
613613

614614
There is a tiny performance penalty when using ``frozen=True``:
615615
:meth:`~object.__init__` cannot use simple assignment to initialize fields, and
616-
must use :meth:`!__setattr__`.
616+
must use :meth:`!object.__setattr__`.
617+
.. Make sure to not remove "object" from "object.__setattr__" in the above markup
617618
618619
.. _dataclasses-inheritance:
619620

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.