
April 17, 2020
2:57 a.m.
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