New submission from Sebastian Rittau <srit...@rittau.biz>:

See https://github.com/python/typing/issues/518 for context.

The typing documentation for 3.6.4rc1 states:

> typing.io ... defines the generic type IO[AnyStr] and aliases TextIO and 
> BinaryIO for respectively IO[str] and IO[bytes].

In the current implementation TextIO and BinaryIO are not aliases, but instead 
derived from IO. This means that values of type IO[...], and especially IO[Any] 
can not be assigned where TextIO or BinaryIO is expected.

----------
assignee: docs@python
components: Documentation
messages: 308083
nosy: docs@python, srittau
priority: normal
severity: normal
status: open
title: typing.TextIO and BinaryIO are not aliases of IO[...]
versions: Python 3.6

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

Reply via email to