[Python-ideas] An ABC representing "Iterable, Sized, Container"

Matthias Kramm kramm at google.com
Fri Jul 22 13:49:27 EDT 2016


On Thursday, July 21, 2016 at 1:44:11 PM UTC-7, Guido van Rossum wrote:
>
> I'm beginning to think that it would be useful to add 
> another ABC to collections.abc (and to typing) that represents the 
> intersection of these three ABCs, and to "upgrade" Set and Sequence to 
> inherit from it. (And Mapping.) 
>

+1 on this, from the pytype side of things.
pytype, during type-inference, always struggles to give names to things, 
and having additional structural types around helps. 

Also, I like "Collection" better than Reiterable, since the latter sounds 
too intricate, possibly scaring users away.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160722/f72b094a/attachment-0001.html>


More information about the Python-ideas mailing list