A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-June/015579.html below:

[Python-Dev] xrange vs generators

[Python-Dev] xrange vs generators [Python-Dev] xrange vs generatorsGuido van Rossum guido@digicool.com
Mon, 25 Jun 2001 12:07:44 -0400
> Hmm.  I'd rather not endure the resulting complaints without a
> strong rationale for deprecating it.  One that strikes close to my
> heart: there's more code in 2.2 to support xrange than there is to
> support generators!  But users don't care about that.

But I do, and historically this code has often been bug-ridden without
anybody noticing -- so it's not like it's needed much.

I would suggest to remove most of the fancy features of xrange(), in
particular the slice, contains and repeat slots.  A step further would
be to remove getitem also, and add a tp_getiter slot instead --
returning not itself but a new iterator that iterates through the
prescribed sequence.

We need a PEP for this.  Anyone?  Should be short and sweet.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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