New submission from khyox:

In https://docs.python.org/3.6/library/typing.html#typing.Union, when giving 
details for Union and in the case when a class and its subclass are present, 
the doc states:

    When a class and its subclass are present, the former is skipped, e.g.:

        Union[int, object] == object

But it is the example (and not the text) which is consistent with PEP 483:

    Corollary: Union[..., object, ...] returns object

So, the proposed correction would be substitute 'former' for 'latter':

    When a class and its subclass are present, the latter is skipped, e.g.:

        Union[int, object] == object

----------
assignee: docs@python
components: Documentation
messages: 295593
nosy: docs@python, khyox
priority: normal
severity: normal
status: open
title: typing.Union doc incoherence in case a class and its subclass are present
versions: Python 3.5, Python 3.6

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

Reply via email to