Message261364
Here's the doc: https://docs.python.org/2/reference/expressions.html#is
It would be great if this line:
"The operators is and is not test for object identity: x is y is true if and only if x and y are the same object. x is not y yields the inverse truth value.[7]"
Could link to the id() builtin doc:
https://docs.python.org/2/library/functions.html#id
One way to rephrase this could be:
"The operators is and is not test for object identity: x is y is true if and only if x and y are the same object or id(x) == id(y). x is not y yields the inverse truth value.[7]"
And, the id's can be hyperlinks.
It would also be nice if that reference linked to a page on integer caching in Python. |
|
Date |
User |
Action |
Args |
2016-03-08 15:39:22 | Mike Vertolli | set | recipients:
+ Mike Vertolli, docs@python |
2016-03-08 15:39:22 | Mike Vertolli | set | messageid: <1457451562.01.0.849547274402.issue26511@psf.upfronthosting.co.za> |
2016-03-08 15:39:21 | Mike Vertolli | link | issue26511 messages |
2016-03-08 15:39:21 | Mike Vertolli | create | |
|