[Python-ideas] keyword arguments everywhere (stdlib) - issue8706
Gregory P. Smith
greg at krypto.org
Fri Mar 2 23:36:42 CET 2012
On Fri, Mar 2, 2012 at 2:18 PM, Guido van Rossum <guido at python.org> wrote:
> On Fri, Mar 2, 2012 at 2:01 PM, Gregory P. Smith <greg at krypto.org> wrote:
> > On Fri, Mar 2, 2012 at 12:00 PM, Guido van Rossum <guido at python.org>
> >> I've written such decorators too, but they've got quite a bit of
> >> overhead...
> > yeah those fall into the gross hacks I alluded to in my original post. ;)
> > I intentionally decided to leave out discussion of "should we allow
> > positional-only arguments to be declared in Python" but it is a valid
> > discussion and thing to consider...
> I just want to remain realistic and acknowledge that positional
> arguments have their place.
> > if we go that route, could it be possible to implement range([start=0, ]
> > stop[, step=1]) such that they are positional only but mutliple arguments
> > are treated different than strictly sequential without writing
> > code in Python to figure out each one's meaning at runtime.
> Eew, I don't think this pattern is useful enough to support in syntax,
> even if one of the most popular builtins (but only one!) uses it.
Technically more than one, if you consider slice() separate from range()...
but they are related so I'm willing to consider them "one" ;)
anyways, agreed. keeping it simple makes sense.
Though the syntax proposals so far aren't looking great to me. I need to
stare at them longer.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas