Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10)

#28797: Modifying class __dict__ inside __set_name__

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 2 months ago by wombatz.gugi
Modified:
3 years, 1 month ago
Reviewers:
ncoghlan
CC:
rhettinger, Nick Coghlan, ned.deily, devnull_psf.upfronthosting.co.za, storchaka, tecki, ebarry, wombatz.gugi_web.de
Visibility:
Public.

Patch Set 1 #

Total comments: 2

Patch Set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/test/test_subclassinit.py View 1 1 chunk +16 lines, -0 lines 0 comments Download
Objects/typeobject.c View 1 1 chunk +43 lines, -15 lines 0 comments Download

Messages

Total messages: 1
Nick Coghlan
3 years, 1 month ago #1
http://bugs.python.org/review/28797/diff/19280/Lib/test/test_subclassinit.py
File Lib/test/test_subclassinit.py (right):

http://bugs.python.org/review/28797/diff/19280/Lib/test/test_subclassinit.py#...
Lib/test/test_subclassinit.py:202: proceeded = []
I believe "notified" would be slightly clearer as the collection name.

http://bugs.python.org/review/28797/diff/19280/Objects/typeobject.c
File Objects/typeobject.c (right):

http://bugs.python.org/review/28797/diff/19280/Objects/typeobject.c#newcode7010
Objects/typeobject.c:7010: dict = PyDict_Copy(type->tp_dict);
I suggest using "names_to_set" as the local variable name here, and then adjust
how its populated as per the comment on the issue (i.e. do the filtering while
building the dict, and store the set_name reference as the value, rather than
the underlying descriptor).
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+