Skip to content
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

AUGMENTED OPERATORS ADDITION #113670

Closed
raja986 opened this issue Jan 2, 2024 · 1 comment
Closed

AUGMENTED OPERATORS ADDITION #113670

raja986 opened this issue Jan 2, 2024 · 1 comment

Comments

@raja986
Copy link

raja986 commented Jan 2, 2024

Bug report

Bug description:

# Add a code block here, if required
l=[]
l+="help"#shouldn't work generally but in latest version
#its working 
#output:['h','e','l','p']
#generally we will use l+=list("help") it was given in #documention that only list can add to a list but it #differs here

CPython versions tested on:

3.12

Operating systems tested on:

Windows

@raja986 raja986 added the type-bug An unexpected behavior, bug, or error label Jan 2, 2024
@Eclips4
Copy link
Member

Eclips4 commented Jan 2, 2024

Hello!
That's not a bug.
l += "help" is the same thing as l.extend("help"). (list method extend accepts an iterable).
For the next time, first of all, ask for help on https://discuss.python.org/c/7, please.

@Eclips4 Eclips4 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2024
@Eclips4 Eclips4 removed the type-bug An unexpected behavior, bug, or error label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants