Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misleading comment in weakrefobject.h #58075

Closed
jimjjewett mannequin opened this issue Jan 25, 2012 · 5 comments
Closed

misleading comment in weakrefobject.h #58075

jimjjewett mannequin opened this issue Jan 25, 2012 · 5 comments
Labels
stdlib Python modules in the Lib dir

Comments

@jimjjewett
Copy link
Mannequin

jimjjewett mannequin commented Jan 25, 2012

BPO 13867
Nosy @freddrake, @pitrou, @JimJJewett

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2013-10-08.18:26:55.007>
created_at = <Date 2012-01-25.23:01:15.674>
labels = ['library']
title = 'misleading comment in weakrefobject.h'
updated_at = <Date 2013-10-08.18:33:01.607>
user = 'https://github.com/JimJJewett'

bugs.python.org fields:

activity = <Date 2013-10-08.18:33:01.607>
actor = 'python-dev'
assignee = 'docs@python'
closed = True
closed_date = <Date 2013-10-08.18:26:55.007>
closer = 'python-dev'
components = ['Library (Lib)']
creation = <Date 2012-01-25.23:01:15.674>
creator = 'Jim.Jewett'
dependencies = []
files = []
hgrepos = []
issue_num = 13867
keywords = []
message_count = 5.0
messages = ['151983', '152142', '199229', '199231', '199232']
nosy_count = 5.0
nosy_names = ['fdrake', 'pitrou', 'docs@python', 'python-dev', 'Jim.Jewett']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue13867'
versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

@jimjjewett
Copy link
Mannequin Author

jimjjewett mannequin commented Jan 25, 2012

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))

@jimjjewett jimjjewett mannequin added docs Documentation in the Doc dir extension-modules C modules in the Modules dir labels Jan 25, 2012
@jimjjewett jimjjewett mannequin assigned docspython Jan 25, 2012
@terryjreedy terryjreedy added stdlib Python modules in the Lib dir and removed docs Documentation in the Doc dir extension-modules C modules in the Modules dir labels Jan 27, 2012
@pitrou
Copy link
Member

pitrou commented Jan 27, 2012

Ha, good catch. The macro could be fixed, or the comment simply be dropped.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Oct 8, 2013

New changeset 1800107873c0 by Georg Brandl in branch 'default':
Closes bpo-13867: remove untrue comment about PyWeakref_Check().
http://hg.python.org/cpython/rev/1800107873c0

@python-dev python-dev mannequin closed this as completed Oct 8, 2013
@python-dev
Copy link
Mannequin

python-dev mannequin commented Oct 8, 2013

New changeset 1cd2fca12abf by Georg Brandl in branch '3.3':
Closes bpo-13867: remove untrue comment about PyWeakref_Check().
http://hg.python.org/cpython/rev/1cd2fca12abf

@python-dev
Copy link
Mannequin

python-dev mannequin commented Oct 8, 2013

New changeset 39e5ab118602 by Georg Brandl in branch '2.7':
Closes bpo-13867: remove untrue comment about PyWeakref_Check().
http://hg.python.org/cpython/rev/39e5ab118602

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

2 participants