General question about Python design goals

Aahz aahz at pythoncraft.com
Sun Nov 27 21:52:01 EST 2005


In article <dmdlhj$87b$1 at online.de>,
Christoph Zwerschke  <cito at online.de> wrote:
>
>For instance, I just wanted to use the index() method on a tuple which 
>does not work. It only works on lists and strings, for no obvious 
>reason. Why not on all sequence types?

Because Guido believes that tuples should be primarily used as
lightweight replacements for C structs.  Therefore they have minimal
functionality.

>Or, another example, the index() method has start and end parameters for 
>lists and strings. The count() method also has start and end parameters 
>for strings. But it has no such parameters for lists. Why?

That's a fair cop.  Submit a patch and it'll probably get accepted.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur."  --Red Adair



More information about the Python-list mailing list