This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: misleading comment in weakrefobject.h
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Jim.Jewett, docs@python, fdrake, pitrou, python-dev
Priority: normal Keywords:

Created on 2012-01-25 23:01 by Jim.Jewett, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg151983 - (view) Author: Jim Jewett (Jim.Jewett) * (Python triager) Date: 2012-01-25 23:01
http://hg.python.org/cpython/file/fec45282dc28/Include/weakrefobject.h#l54

The comment makes sense -- but doesn't appear to be true, so perhaps it is the macro that should change.


 
/* This macro calls PyWeakref_CheckRef() last since that can involve a
   function call; this makes it more likely that the function call
   will be avoided. */
#define PyWeakref_Check(op) \
        (PyWeakref_CheckRef(op) || PyWeakref_CheckProxy(op))
msg152142 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-01-27 23:39
Ha, good catch. The macro could be fixed, or the comment simply be dropped.
msg199229 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-08 18:26
New changeset 1800107873c0 by Georg Brandl in branch 'default':
Closes #13867: remove untrue comment about PyWeakref_Check().
http://hg.python.org/cpython/rev/1800107873c0
msg199231 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-08 18:32
New changeset 1cd2fca12abf by Georg Brandl in branch '3.3':
Closes #13867: remove untrue comment about PyWeakref_Check().
http://hg.python.org/cpython/rev/1cd2fca12abf
msg199232 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-08 18:33
New changeset 39e5ab118602 by Georg Brandl in branch '2.7':
Closes #13867: remove untrue comment about PyWeakref_Check().
http://hg.python.org/cpython/rev/39e5ab118602
History
Date User Action Args
2022-04-11 14:57:26adminsetgithub: 58075
2013-10-08 18:33:01python-devsetmessages: + msg199232
2013-10-08 18:32:07python-devsetmessages: + msg199231
2013-10-08 18:26:55python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg199229

resolution: fixed
stage: resolved
2012-01-27 23:39:52pitrousetmessages: + msg152142
versions: + Python 2.7, Python 3.2, Python 3.3
2012-01-27 23:36:27terry.reedysetnosy: + fdrake, pitrou
components: + Library (Lib), - Documentation, Extension Modules
2012-01-25 23:01:15Jim.Jewettcreate