[Python-ideas] [Suspected Spam] Re: Short form for keyword arguments and dicts

Anders Hovmöller boxed at killingar.net
Mon Jun 24 20:43:04 CEST 2013


I'll take the explicit use of locals any time.


Meaning you prefer "foo(bar=bar)" over "foo(**locals())" right? Because
that seems to be the suggested solution here and I think that's pretty bad
:P

My suggestion isn't about introducing more magic, just a little bit of
convenience for two common use cases: passing along variables with the same
name to another function and throwing a bunch of variables into a dict
(which is basically the same thing since "dict(foo=foo)" == "{'foo':
foo}").
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130624/6df848f6/attachment.html>


More information about the Python-ideas mailing list