tuples, index method, Python's design
paul at boddie.org.uk
Sun Apr 8 16:41:20 CEST 2007
bearophileHUGS at lycos.com wrote:
> Carsten Haese:
> > Adding useless features always makes a product worse. What's your use
> > case for tuple.index?
> Ruby is a bit younger than Python, it has shown that few things may be
> better done in a different way.
I think the Ruby way is just to add a ton of methods to every class
and to give them all aliases as well. Then you let the programmer
"monkey patch" those classes in their own code, too.
> An advantage of PyPy is that it allows faster and simpler ways to perform language experiments. So you can
> even try things first and judge them later. You can find usercases later. This may help rejuvenate Python a bit :-)
It's virtually a matter of copy and paste to do this with CPython.
Here's a patch against the SVN trunk:
More information about the Python-list