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@python components: Documentation messages: 261364 nosy: Mike Vertolli, docs@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 <rep...@bugs.python.org> <http://bugs.python.org/issue26511> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com