Raymond Hettinger added the comment:

-0 on this one.  This is slightly more useful than the other "one-trick-ponies" 
like Container, Hashable, and Iterable.  Those each provide some "recognition" 
capabilities using isinstance() but don't provide any useful "mixin" 
capabilities.  

In practice, I'm not seeing the "recognition" capabilities being used (i.e. no 
one is using "if isinstance(obj, Container)" in real code).  So adding another 
one-trick pony that won't get used is a bit of a waste.  

Also, this would add more clutter to the collections ABCs, obscuring the ones 
that actually have added value (i.e. MutableMapping has been a great success).  
The collections.abc module has become a dumping ground for ABCs that that don't 
really have anything to do with collections and aren't useful for day-to-day 
development (Awaitable, Coroutine, AsyncIterable, AsyncIterator, etc).

One idea is to have a separate module of generic recognition abcs that would be 
used in much the same way as the old types module.  Otherwise, the 
collections.abc module will continue unabated growth away from its original 
purpose as a small group of powerful mixin classes (Sequence, MutableSequence, 
Set, MutableSet, Mapping, MutableMapping, and the dict views).

----------

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

Reply via email to