On 10/09/2013 06:48 PM, Terry Reedy wrote:
On 10/9/2013 9:51 AM, Larry Hastings wrote:
range() in
PyPy accepts keyword parameters, and in fact this works:
range(9, step=2)
That's way illegal in CPython.
But Georg's point is that it does not have to be illegal in CPython.
Range, in particular, does not have to be blazingly fast since it
wraps loops rather than being in loops. I quite agree that it would be
better to fix most functions.
First, if you're proposing to change the signature of range()... well,
good luck. Any proposals I made like that got shot down almost
immediately. I /think/ Guido said somewhere "range isn't changing.
deal with it.", though I admit I don't have a reference for that handy.
Also, if you're suggesting "change the semantics of builtins to get rid
of positional-only parameters", I've got a different example for you:
the dict constructor, which /must/ accept a single optional
positional-only parameter. The only way to simulate that in Python code
is with *args, but now introspection on that function will be
misleading, because the dict constructor doesn't accept more than one
positional-only argument.
And, as Georg suggests, these niggling inconsistencies are the
hobgoblins of my small mind.
//arry/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com