[Python-ideas] Preserving **kwargs order
Ethan Furman
ethan at stoneleaf.us
Thu Apr 3 18:41:19 CEST 2014
On 04/03/2014 06:39 AM, random832 at fastmail.us wrote:
> 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?
Wouldn't that destroy the value of random shuffling of keys that was just added? Or was that storage, and this
presentation... ?
--
~Ethan~
More information about the Python-ideas
mailing list