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

Created on 2012-01-25 23:01 by Jim.Jewett, last changed 2012-01-27 23:39 by pitrou.

Messages (2)
msg151983 - (view) Author: Jim Jewett (Jim.Jewett) 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.
History
Date User Action Args
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