Whereas on Python/typing < 3.5.2 type parameters are stored to __parameters__ attribute, on Python/typing ≥ 3.5.2 __parameters__ attribute is gone and __args__ attribute comes instead.
This patch makes the code compatible with both old and new typing versions.
Whereas on Python/
typing
< 3.5.2 type parameters are stored to__parameters__
attribute, on Python/typing
≥ 3.5.2__parameters__
attribute is gone and__args__
attribute comes instead.This patch makes the code compatible with both old and new
typing
versions.