[Python-3000] PEP3102 Keyword-Only Arguments
steven.bethard at gmail.com
Tue Aug 15 05:11:40 CEST 2006
> It would be really nice in the example above to mark ``self`` in
> ``__call__`` as a positional only argument.
> However, I'm also wondering if we need an actual syntax, or if a simple
> convention would do the trick: start the names of positional-only arguments
> with an underscore.
That would certainly be good enough for me. As long as it's
documented and there's somewhere to point to when someone does it
wrong, it solves my problem.
[Guido van Rossum]
> Hm... and perhaps we could forbid keyword arguments starting with an
> underscore in the call syntax?
-0. As long as the convention exists somewhere, I don't think this
buys us too much. I think supplying a keyword argument when you should
be using a positional is about the same level of
willing-to-shoot-yourself-in-the-foot as using attributes that are
supposed to be private (the other place where leading underscores are
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
--- Bucky Katt, Get Fuzzy
More information about the Python-3000