[Python-ideas] Proto-PEP: Preserving the order of **kwargs in a function.

Eric Snow ericsnowcurrently at gmail.com
Thu Apr 10 20:38:34 CEST 2014


On Apr 10, 2014 1:57 PM, "Dima Tisnek" <dimaqq at gmail.com> wrote:
>
> Sorry to be a spoil-sport, but what next?

Oh this isn't so bad :)

>
> Preserve order of globals?

Already do-able.

> Preserve order of locals?

Function execution stands alone in Python in how explicitly we restrict
flexibility to customize (for the sake of performance).  However, see the
next point.

> Preserve order of class members?

As already noted, you can do so now.  Furthermore, you can use that
mechanism to preserve the order of function "locals".

>
> methinks the whole point of keyword arguments is that they are named.
>
> order is a much weaker concept.

I agree it is weaker.  I still think it is worth preserving, as explained
in the PEP.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140410/788b0a62/attachment.html>


More information about the Python-ideas mailing list