[Python-Dev] API for binary operations on Sets
Daniel Stutzbach
daniel at stutzbachenterprises.com
Thu Sep 30 13:33:59 CEST 2010
On Wed, Sep 29, 2010 at 11:29 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> Does this violate the Sequence ABC (assuming there is one)?
>
There is a Sequence ABC, but it does not define __add__. It only defines
the following methods:
__contains__, __getitem__, __iter__, __len__, __reversed__, count, and index
tuple, range, and str types all register as following the Sequence ABC.
list and bytearray types register as following the MutableSequence ABC,
which is a subclass of the Sequence ABC.
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100930/38b22ad1/attachment.html>
More information about the Python-Dev
mailing list