[Tutor] How can one know if a Python behavior is meant to be a maintained feature or just an implementation artifact?

boB Stepp robertvstepp at gmail.com
Fri Oct 25 14:42:38 EDT 2019


I was at https://realpython.com/python-zip-function/ and read, "In
Python 3.6 and beyond, dictionaries are ordered collections, meaning
they keep their elements in the same order in which they were
introduced. If you take advantage of this feature, then you can use
the Python zip() function to iterate through multiple dictionaries in
a safe and coherent way: ..."  This immediately raised the question in
my mind:  How can I _know_ that I can rely on dictionary elements
being ordered in all future versions of Python >= 3.6?  And more
generally, how can I tell when a consistent behavior is simply an
implementation artifact or if it is an actual feature meant to be
maintained in all future Python versions?

-- 
boB


More information about the Tutor mailing list