Issue 30619: typing.Union doc incoherence in case a class and its subclass are present (original) (raw)

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