[Python-ideas] Fwd: Keyword only argument on function call

David Mertz mertz at gnosis.cx
Wed Sep 26 05:40:36 EDT 2018

Oh, I see that you indeed implemented a macropy version at
https://github.com/boxed/macro-kwargs/blob/master/test.py. Other than use()
vs grab() as the function name, it's the same thing.

Is it true that the macro version has no performance cost?

So it's now perfectly straightforward to provide both a function and a
macro for grab(), and users can play with that API, right? Without changing
Python, programmers can use this "shortcut keyword arguments corresponding
to local names."

On Wed, Sep 26, 2018, 5:31 AM David Mertz <mertz at gnosis.cx> wrote:

> On Wed, Sep 26, 2018, 5:12 AM Anders Hovmöller <boxed at killingar.net>
> wrote:
>> I saw now that I missed the biggest problem with your proposal: yet again
>>> you deliberately throw away errors. I'm talking about making Python code
>>> _less_ error prone, while you seem to want to make it _more_.
>> Beyond the belligerent tone, is there an actual POINT here?
>> Yes, there is a point: you keep insisting that I shut up about my ideas
>> and you motivate it by giving first totally broken code, then error prone
>> and slow code and then you are upset that I point out these facts. I think
>> it's a bit much when you complain about the tone after all that. Especially
>> after you wrote "If someone steps out of line of being polite and
>> professional, just ignore it" the 9th of September in this very thread.
> That's fine. I'm not really as bothered by your belligerent tone as I'm
> trying to find the point underneath it.
> I guess... and I'm just guessing from your hints... that you don't like
> the "default to None" behavior of my *TOY* code. That's fine. It's a
> throwaway demonstration, not an API I'm attached to.
> You're new here. You may not understand that, in Python, we have a STRONG,
> preference for doing things with libraries before changing syntax. The
> argument that one can do something using existing, available techniques is
> prima facie weight against new syntax. Obviously there ARE times when
> syntax is added, so the fact isn't an absolute conclusion.
> But so far, your arguments have only seemed to amount to "I (Anders) like
> this syntax." The supposed performance win, the brevity, and the
> hypothetical future tooling, are just hand waving so far.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180926/94515d75/attachment.html>

More information about the Python-ideas mailing list