[Python-ideas] collections.abc.Stream

Ram Rachum ram at rachum.com
Fri Jun 17 02:00:27 EDT 2016


Is there a way to check in Python whether an object is file-like? (Like
`open`, `StringIO`, etc.) I would think that an abc in collections.abc will
be the standard solution, like we have for so many other data types, but I
can't find one.


Thanks,
Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160617/daf4a23d/attachment.html>


More information about the Python-ideas mailing list