[Python-ideas] Preserving **kwargs order

Eric Snow ericsnowcurrently at gmail.com
Sat Apr 5 20:21:58 CEST 2014


On Apr 4, 2014 7:50 AM, <random832 at fastmail.us> wrote:
> The problem is, there is no such thing as "writing out unordered
> key=value specifications" - anything that is "written out" has an order
> by its nature; the fact that this order is lost immediately is a poor
> abstraction. The desired use case is not to preserve the order of
> **kwds, it's to preserve the order of a sequence of key=value
> specifications.

Right.  However, it is also important to preserve the order, if any, found
in containers unpacked (via **) into a call.  The possibility of "perfect
kwargs preserving" wrappers (thanks Andrew) blurs the distinction.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140405/3f9f885c/attachment.html>


More information about the Python-ideas mailing list