[Python-Dev] best practices stdlib: purging xrange (original) (raw)

Brian Harring ferringb at gmail.com
Tue May 8 02:10:22 CEST 2007


On Tue, May 08, 2007 at 09:14:02AM +1000, Anthony Baxter wrote:

I'd like to suggest that we remove all (or nearly all) uses of xrange from the stdlib. A quick scan shows that most of the usage of it is unnecessary. With it going away in 3.0, and it being informally deprecated anyway, it seems like a good thing to go away where possible.

Any objections?

Punt it when it's no longer useful (py3k); xrange exists for a reason- most usage just needs to iterate over a range of numbers (xrange), not instantiate a list of the range, then iterate over said range (range). Don't much see the point in making stdlib more wasteful in runtime for an "informally deprecated" func that lots of folks in the real world still use.

~brian -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.python.org/pipermail/python-dev/attachments/20070507/37a5ada5/attachment.pgp



More information about the Python-Dev mailing list