On Apr 16, 2020, at 11:04, Alex Hall <alex.moj...@gmail.com> wrote:
> 
>> And what would you do if you wanted to call:
>> 
>> self.do_something(positional, keyword=keyword, keyword1=somethingelse, 
>> keyword2=keyword2)
>> 
>> ?
>> 
>> Eric
> 
> I think this is still pretty clear:
> 
> self.do_something(positional, *, keyword, keyword1=somethingelse, keyword2) 

This kind of reminds me of C++ lambda capture specs, which sound like they’d be 
terribly confusing when you read about them, but in practice, capturing [name, 
count=count+1, values, parent] turns out to be something you can usually write 
without thinking about it, understand when you come back to it later, update to 
values=move(values) when you realize you need that even later, etc. without 
ever having to sit down and parse it all out.

I’m not sure if this would work out the same way or not. And even if it does, 
that hurdle of describing the syntax in a way that people won’t get confused 
the way they do when they first learn the feature in C++ might be hard to 
overcome. But it’s at least plausible that it could be readable and learnable 
enough.

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/RJOFOGROC7YRYK7PUEJFAKBLMMIEPKKX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to