Message279530
In issue28014 __getitem__() is idempotent. Multiple calls of __getitem__() return the same result and keep the OrderedDict in the same state.
> I'd be perfectly happy with making popitem implemented in terms of pop on subclasses when pop is overridden (if pop isn't overridden though, that's effectively what popitem already does).
I like this idea.
> Note: In the expiring case, the fix is still "wrong" if someone used popitem for the intended purpose (to get and delete).
Good catch! But old implementation still looks doubtful to me. |
|
Date |
User |
Action |
Args |
2016-10-27 08:26:18 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, methane, python-dev, eric.snow, zach.ware, josh.r, xiang.zhang, kaniini |
2016-10-27 08:26:18 | serhiy.storchaka | set | messageid: <1477556778.87.0.103397610955.issue27275@psf.upfronthosting.co.za> |
2016-10-27 08:26:18 | serhiy.storchaka | link | issue27275 messages |
2016-10-27 08:26:18 | serhiy.storchaka | create | |
|