mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
various updates from upstream python/typing repo:
- Added typing.Counter and typing.ChainMap generics
- More flexible typing.NamedTuple
- Improved generic ABC caching
- More tests
- Bugfixes
- Other updates
* Add Misc/NEWS entry
(cherry picked from commit b692dc8475
)
This commit is contained in:
parent
2d0c2286f8
commit
0230e64d2c
4 changed files with 335 additions and 58 deletions
14
Lib/test/mod_generics_cache.py
Normal file
14
Lib/test/mod_generics_cache.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
"""Module for testing the behavior of generics across different modules."""
|
||||
|
||||
from typing import TypeVar, Generic
|
||||
|
||||
T = TypeVar('T')
|
||||
|
||||
|
||||
class A(Generic[T]):
|
||||
pass
|
||||
|
||||
|
||||
class B(Generic[T]):
|
||||
class A(Generic[T]):
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue