[Python-3000] optimizing [x]range (original) (raw)

Lisandro Dalcin dalcinl at gmail.com
Tue Jul 31 20🔞37 CEST 2007


On 7/31/07, skip at pobox.com <skip at pobox.com> wrote:

Also, bringing it back more on-topic, what should the value of this expression be? 4 in range(0, 10, 3) That is, are we treating range() as a set or an interval?

IMHO, 'range' is a like a set of integers, not an interval. For me, 'x in range(...)' sould return the same as 'x in list(range(...))'.

-- Lisandro Dalcín



More information about the Python-3000 mailing list