[Python-3000] optimizing [x]range (original) (raw)
Lisandro Dalcin dalcinl at gmail.com
Tue Jul 31 20:31:12 CEST 2007
- Previous message: [Python-3000] optimizing [x]range
- Next message: [Python-3000] optimizing [x]range
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 7/31/07, Guido van Rossum <guido at python.org> wrote:
You missed it -- it should definitely be equivalent to 4 in list(range(0, 10, 3)) i.e. 4 in [0, 4, 8]
An then, as list/tuple contains is implemented in terms of rich comparison (with Py_EQ), perhaps a patch is not so easy to be implemented, at first it do not seems to be as trivial as previously suggested in this thread.
-- Lisandro DalcĂn
- Previous message: [Python-3000] optimizing [x]range
- Next message: [Python-3000] optimizing [x]range
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]