
Michael Hudson <mwh21@cam.ac.uk> writes:
... except when you have stuff like f(a,b=c,**kw) Gruntle. Maybe Python function calls are just complicated! (Has anyone looked at bytecodehacks.xapply? - and that doesn't even handle *-ed and **-ed arguments...). Hmm - the interaction of "a=b" style args & *-ed args is a bit counter-intuitive, particularly as the "a=b" args syntatically have to come before the *-ed args:
I humbly submit that This Is Wrong. I haven't seen anybody complain about it, which suggests to me that noone is using this combination, and I propose either: 1) banning it 2) demanding that the *-ed arg precede the "a=b" args Of course, if noone is using this "feature", then maybe this dusty little corner of the language should be left undisturbed. And I haven't even thought about default arguments yet... about-to-make-an-opcode-called-BODGE_KEYWORD_ARGUMENTS-ly y'rs M. -- nonono, while we're making wild conjectures about the behavior of completely irrelevant tasks, we must not also make serious mistakes, or the data might suddenly become statistically valid. -- Erik Naggum, comp.lang.lisp

Interesting. The *-ed arg cannot precede the a=b args currently, but I agree that it would have made more sense to do it that way. I'm not sure that it's worth allowing the combination of kw args and *tuple, but I'l also not sure that it *isn't* worth it.
Of course, if noone is using this "feature", then maybe this dusty little corner of the language should be left undisturbed.
I think it may be best to leave it alone.
And I haven't even thought about default arguments yet...
That's unrelated. --Guido van Rossum (home page: http://www.python.org/~guido/)

Interesting. The *-ed arg cannot precede the a=b args currently, but I agree that it would have made more sense to do it that way. I'm not sure that it's worth allowing the combination of kw args and *tuple, but I'l also not sure that it *isn't* worth it.
Of course, if noone is using this "feature", then maybe this dusty little corner of the language should be left undisturbed.
I think it may be best to leave it alone.
And I haven't even thought about default arguments yet...
That's unrelated. --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (2)
-
Guido van Rossum
-
Michael Hudson