On Tue, Jun 21, 2016 at 10:12 AM, Eric Snow <ericsnowcurren...@gmail.com> wrote:
> On Mon, Jun 20, 2016 at 12:31 PM, Nikita Nemkin <nik...@nemkin.ru> wrote: > > Right. Ordered by default is a very serious implementation constraint. > > It's only superior in a sense that it completely subsumes/obsoletes > > PEP 520. > > Just to be clear, PEP 520 is more than just OrderedDict-by-default. > In fact, the key point is preserving the definition order, which the > PEP now reflects better. Raymond's compact dict would only provide > the ordered-by-default part and does nothing to persist the definition > order like the PEP specifies. > Judging from Inada's message there seems to be some confusion about how well the compact dict preserves order (personally I think if it doesn't guarantee order after deletions it's pretty useless). Assuming it preserves order across deletions/compactions (like IIUC OrderedDict does) isn't that good enough for any of the use cases considered? It would require a delete+insert to change an item's order. If we had had these semantics in the language from the start, there would have been plenty uses of this order, and I suspect nobody would have considered asking for __definition_order__. -- --Guido van Rossum (python.org/~guido)
_______________________________________________ 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