Skip to content

gh-145369: document dataclass could possibly mutate provided field objects#145387

Open
v01dXYZ wants to merge 1 commit intopython:mainfrom
v01dXYZ:docs-dataclass-field-mutate
Open

gh-145369: document dataclass could possibly mutate provided field objects#145387
v01dXYZ wants to merge 1 commit intopython:mainfrom
v01dXYZ:docs-dataclass-field-mutate

Conversation

@v01dXYZ
Copy link

@v01dXYZ v01dXYZ commented Mar 1, 2026

It is a suggestion to add to the docs a paragraph discouraging using the same field object for multiple fields as dataclass expect them to be different.


📚 Documentation preview 📚: https://cpython-previews--145387.org.readthedocs.build/

-> https://cpython-previews--145387.org.readthedocs.build/en/145387/library/dataclasses.html#dataclasses.field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant