[#]Python question: since dictionaries are ordered in Python 3 now, are there any reasons to still use OrderedDicts? I'm updating some old code that was written in Python 2 originally.
=> More informations about this toot | More toots from paulvanderlaan@typo.social
@paulvanderlaan if “preserve insertion order” is good enough, then there’s no reason to use an OrderedDict.
=> More informations about this toot | More toots from justvanrossum@typo.social
@justvanrossum I figured as much. Thanks.
=> More informations about this toot | More toots from paulvanderlaan@typo.social
@paulvanderlaan and what @justvanrossum 's reply implies is that if you need more stuff like efficiency in dealing with ordering, it still has more features, like..move_last()
not available on common dicts. https://docs.python.org/3/library/collections.html#collections.OrderedDict
=> More informations about this toot | More toots from villares@ciberlandia.pt
@paulvanderlaan
Nope, they're just there for backward compatibility. Convert away!
[#]legacy
=> More informations about this toot | More toots from cazabon@mindly.social
@cazabon @paulvanderlaan not really, they still have more stuff... https://docs.python.org/3/library/collections.html#collections.OrderedDict
=> More informations about this toot | More toots from villares@ciberlandia.pt This content has been proxied by September (3851b).Proxy Information
text/gemini