]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42233: Correctly repr GenericAlias when used with typing module (GH-23081)
authorkj <28750310+Fidget-Spinner@users.noreply.github.com>
Sun, 1 Nov 2020 18:13:38 +0000 (02:13 +0800)
committerGitHub <noreply@github.com>
Sun, 1 Nov 2020 18:13:38 +0000 (10:13 -0800)
commit1f7dfb277e5b88cddc13e5024766be787a3e9127
tree042580f940e32cb44182c0aafd31710610efa455
parent148c76b27ce3823ff7e3ccb1d3a6b4598ce9b35b
bpo-42233: Correctly repr GenericAlias when used with typing module (GH-23081)

Noticed by @serhiy-storchaka in the bpo.  `typing`'s types were not showing the parameterized generic.
Eg. previously:
```python
>>> typing.Union[dict[str, float], list[int]]
'typing.Union[dict, list]'
```
Now:
```python
>>> typing.Union[dict[str, float], list[int]]
'typing.Union[dict[str, float], list[int]]'
```

Automerge-Triggered-By: GH:gvanrossum
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2020-11-02-01-31-15.bpo-42233.YxRj-h.rst [new file with mode: 0644]