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

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


On Mon, Jun 24, 2013 at 8:55 PM, Stephen J. Turnbull <stephen at xemacs.org>wrote:

> 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 think you've just been reading all the mails in this thread of people
claiming I eat children and worship satan :P


>
>  > > 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.


Yet obviously people DO do stuff like:

_('{foo}')

which walks the stack to find the locals and then puts them in there. I
think this shows there is some room for a middle ground that might
disincentivize people from going to those extremes :P

Again, it's not about the exact syntax I suggested, it's about that middle
ground.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130624/6c4b192c/attachment.html>


More information about the Python-ideas mailing list