-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Mutable default values example - TypeError: 'int' object is not iterable #116535
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
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
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Mar 9, 2024
…h-116538) (cherry picked from commit db8f423) Co-authored-by: Declan <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Mar 9, 2024
…h-116538) (cherry picked from commit db8f423) Co-authored-by: Declan <[email protected]>
This was referenced Mar 9, 2024
ericvsmith
pushed a commit
that referenced
this issue
Mar 9, 2024
) (gh-116551) gh-116535: Fix distracting "TypeError" in example code (gh-116538) (cherry picked from commit db8f423) Co-authored-by: Declan <[email protected]>
ericvsmith
pushed a commit
that referenced
this issue
Mar 9, 2024
) (gh-116552) gh-116535: Fix distracting "TypeError" in example code (gh-116538) (cherry picked from commit db8f423) Co-authored-by: Declan <[email protected]>
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: