Raymond Hettinger added the comment:

> That being said, I believe (as the OP of issue 8743) 
> that the ABC collections should comply to the API of
> the Python base collections. 

Sorry Horacio, but your beliefs don't trump Guido's intentional design 
decisions.   He was the one who decided that the collections.abc.Set should 
have a __and__ that accepts an iterable and that it should not have the named 
methods (union, intersection, difference, etc).  Once released, that decision 
is not changeable without breaking existing code that relies on any iterable 
being accepted (which is a useful behavior given the absence of an union() 
method).   Guido also decided long ago that no class other that list would 
repeat its list.__iadd__ design mistake.   You can search the python-dev 
archives to find the discussion where it was decided that this applies to the 
concrete set type (i.e. that s |= 'abc' would raise a TypeError).  I happen to 
agree with that decision.  Though it seems to offend your sense of consistency, 
it does have the advantage of precluding what would likely be a common source 
of errors.

I'm marking this as closed.  The time to litigate API design decisions is prior 
to their being released.  This particular ship sailed a decade ago and has 
mostly worked out fine for all of our users.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30146>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to