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
operator "is" #46273
Comments
Hello, The operator "is" works strange with methods, i.e.: >>> a = 1
>>> a.__abs__ is a.__abs__
False If this is the preferred behavior by some reasons, I think It was tested on python 2.4.4, 2.5.1 and trunk r60477. |
Yes, it is expected since the descriptor access to methods creates a new There is another issue about documenting this, so closing as a duplicate. |
It's actually documented in """ |
I think it's good idea to make a note in Comparisons section or make """ But,
>>> id(a.__abs__) == id(a.__abs__)
True
And only example below shows me error in my objection.
>>> id(w)
6636344
>>> p = id(w)
>>> del w
>>> e = 1
>>> id(e)
6636344 I'm sorry for spam. I've missed bpo-1410739 when search for any open |
id(a.__abs__) == id(a.__abs__) has a completely different explanation -- it so happens that the first |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: