[Python-3000] ABC method mismatch
Guido van Rossum
guido at python.org
Wed Feb 6 23:40:39 CET 2008
On Feb 6, 2008 2:29 PM, Raymond Hettinger <python at rcn.com> wrote:
> The tuple class is registered to the collections.Sequence ABC, but it does not support count() and index() as required by the ABC.
> 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? Do others have an opinion? They shouldn't be a burden for
implementers who use real inheritance from Sequence, as they are
concrete methods there. And it doesn't make sense to move them to
MutableSequence, because there's nothing in them that requires the
sequence to be mutable.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000