On Thu, Jun 27, 2002 at 12:44:36AM -0400, Tim Peters wrote: > > >>> xrange(1,100,2) > > xrange(1, 101, 2) > > > > It's been there since at least Python 2.0. Hasn't anyone noticed this > > bug before? > > It's been that way since xrange() was introduced, but nobody *called* it a > bug before. The two expressions are equivalent: > > >>> list(xrange(1, 100, 2)) == list(xrange(1, 101, 2)) > True I found that seconds after hitting 'y'... > [Greg Ewing] > > ... > > So... why *isn't* slice == <type 'slice'>? > > It is in current CVS Python, but still range != <type 'range'>, and won't > until someone cares enough to change it. There is no spoo^H^H^H^H <type 'range'>. xrange is <type 'xrange'> and range is <built-in function range>. Oren
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4