diff options
author | Mariatta <Mariatta@users.noreply.github.com> | 2017-02-13 22:28:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 22:28:58 (GMT) |
commit | 9c5684e0d380cf5bc109888603756084588ce617 (patch) | |
tree | 64deaca465451f66787fd4f40ae11dd2dec2e75f /Lib/test/mod_generics_cache.py | |
parent | af456b241bd4889ac94eb215e73da400380460a0 (diff) | |
download | cpython-9c5684e0d380cf5bc109888603756084588ce617.zip cpython-9c5684e0d380cf5bc109888603756084588ce617.tar.gz cpython-9c5684e0d380cf5bc109888603756084588ce617.tar.bz2 |
bpo-28556: Various updates to typing (#28) (#78)
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
* Add issue number
Contributed by Ivan Levkivskyi @ilevkivskyi
(cherry picked from commit b692dc8475a032740576129d0990ddc3edccab2b)
Diffstat (limited to 'Lib/test/mod_generics_cache.py')
-rw-r--r-- | Lib/test/mod_generics_cache.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/mod_generics_cache.py b/Lib/test/mod_generics_cache.py new file mode 100644 index 0000000..d9a60b4 --- /dev/null +++ b/Lib/test/mod_generics_cache.py @@ -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 |