Adding item in front of a list
Greg Ewing (using news.cis.dfn.de)
ckea25d02 at sneakemail.com
Mon Apr 14 01:02:08 EDT 2003
Alex Martelli wrote:
> I *hate* the few places in the Nutshell in which
> I couldn't explain a function's behavior by means of Pythonic "optional
> arguments", but rather had to resort to brackets meaning "optional"
Maybe Python should in general allow optional arguments to
be on the left instead of the right:
def myrange(start = 0, stop):
...
and then range() and insert() wouldn't be anomalous!
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list