On Thu, Apr 16, 2020 at 01:41:42PM -0400, Eric V. Smith wrote:
> On 4/16/2020 1:30 PM, Rhodri James wrote:

> >I beg to differ.  I do find "def foo(a, *, b)" gets in the way of 
> >readability.
> 
> And what would you do if you wanted to call:
> 
> self.do_something(positional, keyword=keyword, keyword1=somethingelse, 
> keyword2=keyword2)

Sorry, am I missing something? Why wouldn't you just call it precisely 
as you said?

    self.do_something(positional, keyword=keyword, keyword1=somethingelse, 
keyword2=keyword2)

is syntax that goes back to Python 1.x. You don't need the `*` in the 
function definition for it to work.



-- 
Steven
_______________________________________________
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/RSEHWL5M5XWCYJZLP5QUGGY4EGBMI2B4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to