01-short-introduction-to-Python.md: remove statement about order in Python dicts#380
Conversation
The order in Python dictionaries is a delicate issue and is too complex to describe to a novice learner correctly. Statement that the order in which key-value pairs are returned in a 'for' loop is not guaranteed, on the other hand, is no longer correct. We could say that some "order-dependent" functions do not apply to the classical Python dictionaries (e.g., reversed, move_to_end), but that would be an overkill. I think that deleting this statement might be the best course of action at this moment.
|
Oooh boy, how annoying. I'm not sure what to do here. If they follow our install instructions, they will download python 3.7, in which dicts are ordered. So, I guess my feeling is that we should just remove this, since this won't be the behavior going forward. I'm not sure if I think we should replace it with anything. Maybe something like: "Like lists, dictionaries are ordered. However, ordered dictionaries are a recent innovation in python, and when you look for help on the internet or look at someone else's code from a published paper, you may find references to dictionaries being unordered." |
Yeah.... about that.... They preserve the insertion order but they aren't ordered. Let's, perhaps, just delete the paragraph. |
01-short-introduction-to-Python.md: remove statement about order in Python dicts
I suggest removing the statement about the order in Python dictionaries. The behavior has changed between Python 3.5, 3.6, and 3.7 and it would be a bit too difficult to explain.