[docs] [issue30619] typing.Union doc incoherence in case a class and its subclass are present

khyox report at bugs.python.org
Fri Jun 9 20:38:11 EDT 2017


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 at python
components: Documentation
messages: 295593
nosy: docs at 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 <report at bugs.python.org>
<http://bugs.python.org/issue30619>
_______________________________________


More information about the docs mailing list