[Python-ideas] Preserving **kwargs order

random832 at fastmail.us random832 at fastmail.us
Thu Apr 3 15:39:49 CEST 2014


On Thu, Mar 20, 2014, at 2:43, Andrew Barnert wrote:
> The obvious way to fix this is to make a **kwargs parameter pack the
> keyword arguments into an OrderedDict, but Guido has already rejected
> that, which is why Eric Snow had to come up with his two other options.
> But they don't solve the problem.

What about putting a constraint on the dict class that it shall
enumerate its keys in the order they were added as long as no key has
ever been removed? C#'s Dictionary does this [though it doesn't have a
guarantee of doing so].


More information about the Python-ideas mailing list