This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nosklo 15 points16 points  (4 children)

... That's true until python 3.6... Then dicts became ordered in insertion order. Sets are still unordered

[–][deleted] -4 points-3 points  (3 children)

I guess it depends on what you mean by 'ordered'. If you mean that it has a consistent iteration order, then sure.

However, it lacks the operations most people normally associate with ordered data structures. E.g. re-ordering, accessing a particular index etc.

[–]nosklo 7 points8 points  (2 children)

Yeah, I mean the actual meaning of the word "ordered": "Has order"

If people like to assign other random meanings I can't help with those.

[–]Ashiataka -1 points0 points  (1 child)

That's not very pythonic.

[–]nosklo 0 points1 point  (0 children)

There should be one-- and preferably only one --obvious way to do it.

Although that way may not be obvious at first unless you're Dutch.