Michael Foord, 26.01.2010 01:14:
> How great is the complication? Making list.pop(0) efficient sounds like
> a worthy goal, particularly given that the reason you don't use it is
> because you *know* it is inefficient

I agree. Given a programmer the insight that lists are implemented as
arrays in CPython is essentially saying "don't use list.pop(0), it's
SLOW!". So they won't use it, and even avoid it for small lists where it
doesn't really matter. It basically stinks.

Making list.pop(0) fast removes another edge where programmers must
prematurely concentrate on implementation specifics of the interpreter they
use, rather than the functionality they want to implement. I think that's
an improvement to the simplicity that Python provides. It's basically
saying: "care about performance when you have to, but otherwise believe in
the core developers to make your code fast enough in most common cases".

Stefan

_______________________________________________
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