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

Stephen J. Turnbull stephen at xemacs.org
Mon Jun 24 20:55:31 CEST 2013


Andrew McNabb writes:

 > > You're proposing that the "awful" workaround be made magical, builtin,
 > > and available to be used in any situation whether appropriate or not?
 > 
 > No, I'm not.  That would look like this:
 > 
 > >>> print('{spam} and {eggs}'.format())

Ah, OK, that's right.  Just goes to show that foo(=spam, =eggs) is
really too confusing to be used. ;-)

 > > I'll take the explicit use of locals any time.
 > 
 > I don't think anyone likes the idea of magically passing locals into all
 > function calls.

My apologies, I didn't really think anybody wants "'{foo}'.format()"
to DWIM.  The intended comparison was to the proposed syntax, which I
think is confusing and rather ugly.



More information about the Python-ideas mailing list