-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
Mutable default values example - TypeError: 'int' object is not iterable #116535
Labels
docs
Documentation in the Doc dir
Comments
This was referenced Mar 9, 2024
Your point is valid. And what's more, using |
ericvsmith
pushed a commit
that referenced
this issue
Mar 9, 2024
This was referenced Mar 9, 2024
ericvsmith
pushed a commit
that referenced
this issue
Mar 9, 2024
ericvsmith
pushed a commit
that referenced
this issue
Mar 9, 2024
Merged. Thanks! |
adorilson
pushed a commit
to adorilson/cpython
that referenced
this issue
Mar 25, 2024
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation
The example:
dataclasses.html#mutable-default-values
not only raises the
ValueError
being discussed, but also an unwantedTypeError
when you calladd()
, that distracts from the point of the example.Would be better to call
append()
to add a single element to the listLinked PRs
The text was updated successfully, but these errors were encountered: