[Python-ideas] Preserving **kwargs order (was: Re: OrderedDict literals)
Eric Snow
ericsnowcurrently at gmail.com
Tue Apr 15 15:01:01 CEST 2014
On Mon, Apr 14, 2014 at 10:12 PM, Franklin? Lee
<leewangzhong+python at gmail.com> wrote:
> Point is, again, I don't know that it won't be faster. You seem to know that
> it won't be faster, but I don't see you saying that there CAN'T be such
> cleverness when kwargs are nice and forwarded nicely, even with deletions or
> additions allowed.
The point is moot. The object into which uncollected kwargs is bound
must be a complete mapping instance that supports any type of key. We
certainly *initialize* it with string keys, but once it is bound in
the function, code is free to do anything that works with a normal
dict (think Liskov). Limiting capability is a non-starter.
That said, thanks for posting the idea. It wasn't all that unfeasible
(unlike other ideas that land here <wink>), even if it ultimately
wasn't acceptable.
-eric
More information about the Python-ideas
mailing list