[issue13867] misleading comment in weakrefobject.h

New submission from Jim Jewett <jimjjewett@gmail.com>: 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)) ---------- assignee: docs@python components: Documentation, Extension Modules messages: 151983 nosy: Jim.Jewett, docs@python priority: normal severity: normal status: open title: misleading comment in weakrefobject.h _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________

Changes by Terry J. Reedy <tjreedy@udel.edu>: ---------- components: +Library (Lib) -Documentation, Extension Modules nosy: +fdrake, pitrou _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________

Antoine Pitrou <pitrou@free.fr> added the comment: Ha, good catch. The macro could be fixed, or the comment simply be dropped. ---------- versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________

Roundup Robot added the comment: New changeset 1800107873c0 by Georg Brandl in branch 'default': Closes #13867: remove untrue comment about PyWeakref_Check(). http://hg.python.org/cpython/rev/1800107873c0 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________

Roundup Robot added the comment: 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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________

Roundup Robot added the comment: 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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________

Changes by Terry J. Reedy <tjreedy@udel.edu>: ---------- components: +Library (Lib) -Documentation, Extension Modules nosy: +fdrake, pitrou _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________

Antoine Pitrou <pitrou@free.fr> added the comment: Ha, good catch. The macro could be fixed, or the comment simply be dropped. ---------- versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________

Roundup Robot added the comment: New changeset 1800107873c0 by Georg Brandl in branch 'default': Closes #13867: remove untrue comment about PyWeakref_Check(). http://hg.python.org/cpython/rev/1800107873c0 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________

Roundup Robot added the comment: 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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________

Roundup Robot added the comment: 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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13867> _______________________________________
participants (4)
-
Antoine Pitrou
-
Jim Jewett
-
Roundup Robot
-
Terry J. Reedy