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

#25410: Clean up and fix OrderedDict

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 11 months ago by storchaka+cpython
Modified:
3 years, 9 months ago
Reviewers:
ericsnowcurrently
CC:
rhettinger, devnull_psf.upfronthosting.co.za, eric.snow, storchaka, bup, csabella
Visibility:
Public.

Patch Set 1 #

Total comments: 30

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Patch Set 5 #

Patch Set 6 #

Patch Set 7 #

Patch Set 8 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/test/test_ordered_dict.py View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 0 comments Download
Objects/odictobject.c View 1 2 3 4 5 6 7 2 chunks +11 lines, -28 lines 0 comments Download

Messages

Total messages: 6
eric.snow
I have some concerns about breaking compatibility with the pure Python implementation. Also, it seems ...
3 years, 11 months ago #1
storchaka_gmail.com
http://bugs.python.org/review/25410/diff/15768/Objects/odictobject.c File Objects/odictobject.c (left): http://bugs.python.org/review/25410/diff/15768/Objects/odictobject.c#oldcode992 Objects/odictobject.c:992: /* od.__dict__ isn't necessarily a dict... */ On 2015/10/17 ...
3 years, 11 months ago #2
eric.snow
http://bugs.python.org/review/25410/diff/15768/Objects/odictobject.c File Objects/odictobject.c (left): http://bugs.python.org/review/25410/diff/15768/Objects/odictobject.c#oldcode992 Objects/odictobject.c:992: /* od.__dict__ isn't necessarily a dict... */ On 2015/10/17 ...
3 years, 11 months ago #3
storchaka_gmail.com
http://bugs.python.org/review/25410/diff/15768/Objects/odictobject.c File Objects/odictobject.c (left): http://bugs.python.org/review/25410/diff/15768/Objects/odictobject.c#oldcode992 Objects/odictobject.c:992: /* od.__dict__ isn't necessarily a dict... */ On 2015/10/17 ...
3 years, 11 months ago #4
storchaka_gmail.com
http://bugs.python.org/review/25410/diff/15768/Objects/odictobject.c File Objects/odictobject.c (left): http://bugs.python.org/review/25410/diff/15768/Objects/odictobject.c#oldcode1030 Objects/odictobject.c:1030: cls = _PyObject_GetAttrId((PyObject *)od, &PyId___class__); On 2015/10/17 19:45:41, storchaka ...
3 years, 11 months ago #5
eric.snow
3 years, 11 months ago #6
On 2015/10/17 19:58:45, storchaka wrote:
> > Isn't type(self) is always the same as self.__class__ for pure Python class?
> If
> > right, then this change doesn't have any effect.
> 
> It is the same if you assigned the __class__ attribute, but can be different
if
> set __class__ in the subclass declaration. Yes, I'll change self.__class__to
> type(self) in Python implementation of __repr__ and __reduce__.

That sounds good to me as long as the python-dev discussion doesn't go a
different way. :)
Sign in to reply to this message.

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