tuples, index method, Python's design

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Sat Apr 7 09:45:20 EDT 2007


Carsten Haese:
> The lack of convincing use cases is still a pertinent reason today. Note
> that the original poster on this thread did not present a use case for
> tuple.index, they were only asking out of curiosity.
> If you have a use case for tuple.index, please show it to me, and I'll
> show you what you should be using instead of a tuple.

Maybe we can add such methods to the PyPy tuples for some time, to
experimentally see if they make the language worse :-)

(Adding such methods may reduce the amound of information you have to
keep in your brain to program with Python. If tuples and lists share
more methods then you don't have to remember what methods tuples don't
have. This means less complexity.)

Bye,
bearophile




More information about the Python-list mailing list