Hi, Could be missed by me but the guarantee that dict literals are ordered implies not that dict must be ordered in all cases.
The dict literal: d = {"a": 1, "b": 2} will keep the order of "a" and "b" because it is specified as a dict literal. But d["c"] = 3 can change this order and it is allowed by the specification of guaranteed ordered dict literals. Please correct me if I am wrong. In Python 3.6 it does not because dict is implemented ordered and the insertion order is preserved. Also I think we should give the whole thing more time and wait with this guarantee. There are valid concerns against this. Personally I like the ordering but if I need an ordered dict it is ok for me to write this explicitly. The **kwargs are already guaranteed to be ordered and this was useful because the OrderedDict constructor benefits and for other places it is useful. But making all dict's per default ordered is another level. Regards, Wolfgang _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com