mark dickinson vqpxmqtcgmailcom thu apr 24 2008 1150 nick coghlan wrote theres definitely bugs area range object code though x range233 2 lenx 0 x0 traceback recent call last file line 1 indexerror range object index range hmm im seeing bug missing seems two reasonable behaviours rangea b b less return empty range example raise valueerror see arguments behaviours one good argument favour current behaviour xrangea b python 2x currently returns empty range b xrange3 2 xrange3 3 also believe overflowerror lenself attempting index range intercepted converted something meaningful actual operation requested programmer eg valueerror index range objects sysmaxsize elements agreed though easy fix things rangea bn always works integer n b fix doesnt significant performance impact wouldnt even better mark thu 07 aug 2008 204229 0400 python3000 using range