On 6 July 2013 21:38, Jan Kaliszewski <zuo@chopin.edu.pl> wrote:
While I like all the literal/comprehension/etc.-related proposals, those related to function definitions seem to me to be dubious.
I am not convinced by the argument of unification with the assignment LHS syntax.
Assignment LHS and function parameter processing are inherently different in Python anyway:
Agreed, but similarity still lowers cognitive load.
Making possible to define some positional arguments after *args does not seem to be a big win, and would destroy nice simplicity of the way you specify keyword-only arguments.
My personal interpretation is that it simplifies things; if you want keyword-only arguments, you use a lone star. Otherwise you don't get them. I find that comprehensively simpler, especially as it is more in-tune with assignment. I'm not actually sure what levels of backward-incompatibility are deemed reasonable between releases, so I'm not sure whether there's any point arguing for this. I also seem to have magically created this - it seems not to be in the original implementation. Hence if no-one supports the idea, and since I'm not very attached to it, there's no loss in letting it go. It'd be easier if I had a running version of the implementation to test against (I wouldn't just make things up), but as I said above I'm finding it difficult to figure out.
Forbidding keyword arguments before *args in function calls does not seem so bad, but still it is a serious backwards incompatibility... And why would we actually want to forbid it?
I included it because my understanding is that it was in the original patch. I'm not sure why anyone would want to forbid it, other than it being easier to write the patch that way. Compatibility aside, I'm not sure why anyone would want to keep it either, though.