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

2016-09-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks for the patch.  Not need to go back to 2.7.  This is really minor.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-09-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f38b831cb6b9 by Raymond Hettinger in branch '3.5':
Issue #26511:  Reference the id() function in the 'is' and 'is not' docs
https://hg.python.org/cpython/rev/f38b831cb6b9

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-09-11 Thread Thomi Richards

Thomi Richards added the comment:

The attached patch applies to 3.5, but not 2.7. If you're happy with it, I can 
work up a version for 2.7 as well.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-09-11 Thread Thomi Richards

Thomi Richards added the comment:

Attached patch for master branch.

--
keywords: +patch
nosy: +thomir
Added file: http://bugs.python.org/file44568/issue_26511.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-03-12 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-03-12 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I agree with the OP that is would be useful to link to id().  I also concur 
with Terry that integer caching is to remain an undocumented implementation 
specific detail (just an optimization).  Also, Martin is correct that the 
proposed wording doesn't read well.

--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-03-11 Thread Martin Panter

Martin Panter added the comment:

Please don’t use nested brackets like that in English text. Try to rewrite the 
sentence without brackets (e.g. use a comma or say “This is equivalent to”) [or 
use a different kind of bracket if you really must (to make the nesting 
clearer)].

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-03-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There is not 'integer caching in Python'.  This is strictly an implementation 
feature of CPython, and any other implementation that does similarly.

"or id(x) == id(y)" should be "(id(x) == id(y))" as the addition is an 
alternate wording, not an alternate condition.  I am not sure that this will 
always be helpful.

--
nosy: +terry.reedy
stage:  -> needs patch
versions: +Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-03-08 Thread Mike Vertolli

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com