-
Notifications
You must be signed in to change notification settings - Fork 216
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
sorted(x) modifies the argument x (bug?) #866
Labels
Comments
chopin
changed the title
sorted(x) changes the argument x (bug?)
sorted(x) modifies the argument x (bug?)
Dec 18, 2023
The sorted() method call the copy() method
It's bugged The copy method must be something like :
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
x.sort() modifies x, but sorted(x) doesn't modify the argument x in Python as following:
But, I encountered a Transcrypted code modifying the argument x in sorted(x):
result:
Based on the example above, it looks like sorted(x) modifies x as x.sort() in Transcrypt. It is not true in Python.
The text was updated successfully, but these errors were encountered: