tuples, index method, Python's design

Paul Boddie paul at boddie.org.uk
Sun Apr 8 10:41:20 EDT 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:

http://sourceforge.net/tracker/index.php?func=detail&aid=1696444&group_id=5470&atid=305470

Paul




More information about the Python-list mailing list