Message201517
Hi Raymond! Yes, I had the same reaction at first, but then it seemed to be possible to implement a reasonably good behavior with almost no performance hit.
Plainly undefined behaviors are a mess for other implementations because in half of the big projects people don't realize they depend on it at some place --- particularly if the behavior is "mostly sane", as it seems to be right now for OrderedDict.
For example, I believe the following code to always work:
for key in ordered_dict:
if some_condition:
del ordered_dict[key]
whereas it always raise RuntimeError with regular dicts, which are both ok choices. But silently not working would be much worse. |
|
Date |
User |
Action |
Args |
2013-10-28 09:06:17 | arigo | set | recipients:
+ arigo, rhettinger, nikratio |
2013-10-28 09:06:17 | arigo | set | messageid: <1382951177.88.0.64557142547.issue19414@psf.upfronthosting.co.za> |
2013-10-28 09:06:17 | arigo | link | issue19414 messages |
2013-10-28 09:06:17 | arigo | create | |
|