[New-bugs-announce] [issue26511] Add link to id() built-in in comparison operator documentation for "is"

Mike Vertolli report at bugs.python.org
Tue Mar 8 10:39:22 EST 2016


New submission from Mike Vertolli:

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.

----------
assignee: docs at python
components: Documentation
messages: 261364
nosy: Mike Vertolli, docs at python
priority: normal
severity: normal
status: open
title: Add link to id() built-in in comparison operator documentation for "is"
type: enhancement
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26511>
_______________________________________


More information about the New-bugs-announce mailing list