Hello,

hopefully this mailing list is the right address for the following.

Since there is a huge gap in performance between tuple(cur.execute(...))
and list(cur.execute(...)) - i saw a factor in the magnitude of 50 once -
the first has always to be chosen when sufficient. Even if that difference
would be smaller - you also document the resulting sequence as read-only
in your code. I also use deque( ... some generator ... ) frequently
(And i think, that this should have more room in tutorials for
beginners - some of them have no idea, what tuples are for).

With such a tuple tp i tried 'ix = tp.index(...)' recently and was
astonished to learn, that this doesn't work. Since we have '... in tp'
for me it seems, that it should make very little difference in 
the interpreter's code, if .index() would be a method of any sequence, 
mutable or not. Such a small difference, that this minor change wouldn't
deserve a PEP.

Do i overlook something here ?

Kind regards, Joost Behrends
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to