diff options
author | Ivan Levkivskyi <levkivskyi@gmail.com> | 2017-02-13 21:50:14 (GMT) |
---|---|---|
committer | Mariatta <Mariatta@users.noreply.github.com> | 2017-02-13 21:50:14 (GMT) |
commit | b692dc8475a032740576129d0990ddc3edccab2b (patch) | |
tree | bca0dc4276619ea45012e3dd1fb4159056d9fefc /Lib/test/mod_generics_cache.py | |
parent | 3cdbd68ce8230cff1afb67472b96fbfa7f047e32 (diff) | |
download | cpython-b692dc8475a032740576129d0990ddc3edccab2b.zip cpython-b692dc8475a032740576129d0990ddc3edccab2b.tar.gz cpython-b692dc8475a032740576129d0990ddc3edccab2b.tar.bz2 |
bpo-28556: Various updates to typing (#28)
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
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 |