[Python-3000] ABC method mismatch

Raymond Hettinger python at rcn.com
Wed Feb 6 23:55:36 CET 2008


>> Do you want to drop those methods from the ABC or add them to tuple?

> I'm not sure, but I'm tempted to add them to the ABC.
> What's your hunch?

My hunch is that adding count() and index() to tuple is at
harmless at worst and sometimes helpful at best (I've
occasionally needed them and felt mild annoyance at having
coerce tuples to lists just to get them).

Also, if you add them now, you won't spend the rest of your
life turning down requests to add them as people periodically
discover the mismatch with strings and lists.


Raymond


More information about the Python-3000 mailing list