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

String Interning #135

Closed
pkkdguy opened this issue Aug 19, 2019 · 4 comments
Closed

String Interning #135

pkkdguy opened this issue Aug 19, 2019 · 4 comments

Comments

@pkkdguy
Copy link

pkkdguy commented Aug 19, 2019

a,b = "wtf!", "wtf!"
a is b # This returns False

@Jamim
Copy link

Jamim commented Aug 19, 2019

I've just checked this and found that the behavior was changed in Python 3.7.

$ python2.7 -c 'a, b = "wtf!", "wtf!"; print(a is b)'
True
$ python3.6 -c 'a, b = "wtf!", "wtf!"; print(a is b)'
True
$ python3.7 -c 'a, b = "wtf!", "wtf!"; print(a is b)'
False

@satwikkansal
Copy link
Owner

Yeah, there's a note regarding this in 3.0 branch (not merged to master yet), bf967b0

@satwikkansal
Copy link
Owner

Also related: #100

@satwikkansal
Copy link
Owner

Closing this in favor of other issue.

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

3 participants