[Python-3000] range() issues (original) (raw)

Guido van Rossum guido at python.org
Thu May 1 01:36:24 CEST 2008


On Wed, Apr 30, 2008 at 4:11 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:

In the bug tracker, Alexander mentioned the possibility of removing length and getitem support from range() objects in py3k, and implementing only lengthhint instead (leaving range() as a bare-bones iterable). I'm starting to like that idea more and more.

Indeed. Do check if it breaks anything though (and how serious the breakage is).

Also note that bool for a range should probably remain implemented -- True for a non-empty range, False for an empty one.

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



More information about the Python-3000 mailing list