Alan G Isaac schrieb: > On 1/16/2009 1:15 PM Paul Rubin apparently wrote: >> range is an iterator now. Try itertools.islice. > > Well yes, it behaves like xrange did. > But (also like xrange) it supports indexing. (!) > So why not slicing? > I expected this (to keep it functionally > more similar to the old range).
The old range function returned a list. If you need the old functionality you can use list(range(...))[]. Why do you want to slice a range anyway? The range type supports a start, stop and step argument. Christian -- http://mail.python.org/mailman/listinfo/python-list