[Python-Dev] PEP 3102: Keyword-only arguments
Michael Urman
murman at gmail.com
Sat May 6 01:07:21 CEST 2006
On 5/5/06, Jean-Paul Calderone <exarkun at divmod.com> wrote:
> @keyword
> def foo(a, b, c=10, d=20, e=30):
> return a, b, c, d, e
Cute, indeed. That decorator implementation is not as flexible as the
* which can go after positional parameters, but of course that is easy
to tweak. However the part I didn't bring up as a reason to prefer
explicit syntax for required-as-keyword is performance. I suspect
syntactic support will be faster than **kw.pop; I'm almost certain
it's faster than decorator gimmicks. I'm not certain at all that it's
a concern either way.
Michael
--
Michael Urman http://www.tortall.net/mu/blog
More information about the Python-Dev
mailing list