On 24 January 2016 at 20:29, Albert-Jan Roskam <sjeik_ap...@hotmail.com> wrote: >> I guess that the authors of OrderedDict just didn't really consider >> this to be very useful. Apart from having ordered iteration >> OrderedDict is not really that deeply thought out. There's a thread on >> python-ideas about the inconsistent behaviour of the keys and values >> views and equality comparison of OrderedDicts on python-ideas at the >> moment: >> >> https://mail.python.org/pipermail/python-ideas/2015-December/037472.html > > As I said in a prior email: That is SCARY! Should I just avoid OrderedDict > like the plague?
No, OrderedDict works fine. Just in answer to your question about why this particular feature isn't there: 1) The slicing thing is conceptually not that well defined. To me it was obvious what you meant but I suspect that many people would find it confusing or unexpected. (see e.g. the initial responses from Steve and Ben in this thread) 2) The OrderedDict isn't really that deeply thought out beyond "I want a dict that has a consistent iteration order". -- Oscar _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor