[Python-ideas] keyword arguments everywhere (stdlib) - issue8706

Raymond Hettinger raymond.hettinger at gmail.com
Sat Mar 3 03:22:32 CET 2012

On Mar 2, 2012, at 2:01 PM, Gregory P. Smith wrote:

> speaking of range... I think start and stop are plenty obvious, but I'd like to allow step to be specified as a keyword.

range() has been around 20+ years and this has never been requested.
In my teaching of Python, it is never arisen as an issue.
AFAICT, there isn't any code that would be better if step were written as a keyword.

The only expressed motivation for the change is "I'd like" it.
There should be a higher bar for changing builtins.

Many of the proposals in this thread are gratuitous and will create
unnecessary work for other people who have to change anything
that purports to have a range-like interface, people who have to
change the other Python implementations, folks who who have 
to remember which version of Python supports it and which other 
slice-like functions would also take the argument etc.

ISTM that having a ton of tiny nit changes to the language
doesn't make it better.  Instead, effort should be directed
as substantive changes (better https support, completing xmlrpc, etc).
Micro rearrangements of the language and a real PITA for folks
who have to go back-and-forth between different versions of Python.
So, we should raise the bar to something higher than "I'd like feature X"
and ask for examples of code that would be better or for user requests
or some actual demonstration of need.  ISTM that 20 years of history
with range() suggests that no one needs this (nor have I seen a need
in any other language with functions that take a start/stop/step).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120302/39772b99/attachment.html>

More information about the Python-ideas mailing list