3 ms·
I don’t get the part about unordered maps. Python never promised ordered dicts (until 3.7) it wasn’t a secret nor did you have any reason to believe that they w
by mrweasel 6y ago
I don’t get the part about unordered maps. Python never promised ordered dicts (until 3.7) it wasn’t a secret nor did you have any reason to believe that they would be ordered.
I mean they’re ordered now and that provide some benefit in terms of simpler code in some cases, but it was never a problem as such.
- swinglock 6y agoBesides, Python already had OrderedDict in the standard library for a decade.
- Someone 6y agoI think it refers to the fact that, if dictionaries do not promise to be ordered but have predictable (and consistent between runs) iteration order (e.g. by insertion order), code can start depending on that. Some people think that, if code ‘out there’ starts depending on that, it’s better to update the documented API to promise what it actually does.