[Python-ideas] [Suspected Spam] Re: Short form for keyword arguments and dicts
Stephen J. Turnbull
stephen at xemacs.org
Mon Jun 24 19:50:27 CEST 2013
Andrew McNabb writes:
> I've seen people use an awful workaround for this:
>
> >>> print('{spam} and {eggs}'.format(locals()))
>
> While it looks a little magical, the proposed syntax would be an
> improvement (especially when there are many arguments):
>
> >>> print('{spam} and {eggs}'.format(=spam, =eggs))
You're proposing that the "awful" workaround be made magical, builtin,
and available to be used in any situation whether appropriate or not?
I'll take the explicit use of locals any time.
More information about the Python-ideas
mailing list