[Python-ideas] Why does BoundArguments use an OrderedDict?

random832 at fastmail.us random832 at fastmail.us
Fri Dec 19 16:26:46 CET 2014

On Fri, Dec 19, 2014, at 04:07, Petr Viktorin wrote:
> I believe that if there's a new predictabledict type, and deleting
> from it would invalidate the order, then predictabledict should not
> support deletions.

This would defeat the broader idea of using an implementation with such
properties as the standard dict (which would allow its use for kwargs,
class dictionaries, etc). What about adding a flag to indicate whether
it is in an ordered state (i.e. either there have been no deletions
since it was last empty, or there have been no insertions since the
first deletion after it was last empty, or whatever other status applies
to the implementation).

More information about the Python-ideas mailing list