PEP 260: simplify xrange()

Mark 'Kamikaze' Hughes kamikaze at kuoi.asui.uidaho.edu
Tue Jun 26 17:42:36 EDT 2001


26 Jun 2001 13:59:55 -0400 in <mailman.993578546.30453.python-list at python.org>,
Guido van Rossum <guido at digicool.com> spake:
> Here's another sweet and short PEP.  What do folks think?  Is
> xrange()'s complexity really worth having?
> PEP: 260
> Title: Simplify xrange()
>     I propose to strip the xrange() object to the bare minimum.  The
>     only retained sequence behaviors are x[i], len(x), and repr(x).

  Looks reasonable - are there any uses of the advanced behaviors in the
standard libraries?  All of my uses are `for x in xrange(whatever):`,
but it's possible that someone's doing something weird with it.  Are
people even using repr on xranges (pickling a repr seems really odd)?

  You know, this is one of the things that amazes me about Python - you
actually *remove* features that aren't useful.

  (Just leave lambda alone, man, I like and use it...)

-- 
 <a href="http://kuoi.asui.uidaho.edu/~kamikaze/"> Mark Hughes </a>
"I will tell you things that will make you laugh and uncomfortable and really
fucking angry and that no one else is telling you.  What I won't do is bullshit
you.  I'm here for the same thing you are.  The Truth." -Transmetropolitan #39



More information about the Python-list mailing list