On Wed, Dec 26, 2018 at 03:10:05AM -0800, Nathaniel Smith wrote:
> On Wed, Dec 26, 2018, 02:19 Andrew Svetlov <andrew.svet...@gmail.com wrote:
> 
> >
> > Also I'm thinking about type annotations in typeshed.
> > Now the type is Union[array[int], bytes, bytearray, memoryview]
> > Should it be Union[io.BinaryIO, array[int], bytes, bytearray, memoryview] ?
> >
> 
> Yeah, trying to support both buffers and file-like objects in the same
> function seems like a clearly bad idea.

It might be clear to you, but it's not clear to me. Why is it a bad 
idea? The OP has a function which does precisely that, and it works well 
for him.



-- 
Steve
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to