On Thu, Apr 16, 2020 at 07:50:30PM +0200, Alex Hall 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)
It's not clear to me. It's currently (3.8) illegal syntax, and I have no
idea what the `*` would mean in the function call.
Of course it's currently illegal syntax, that's the point.
I don't think you really need to know what it means to read the code for most purposes. You look at the function call and you can see a bunch of names being passed to self.do_something. If the function call has 'keyword=keyword' in it instead of just 'keyword', that's not adding much information. The technical details of how an argument is being passed are usually not important to readers.
I know what it means in function definitions, but somehow we seem to
have (accidentally?) flipped from talking about Rhodi's dislike of the
`*` in function *definitions* to an (imaginary? proposed?) use of `*` in
Have I missed something?
And now it looks like you missed it too.