Skip to content

v2.6

Choose a tag to compare

@Fatal1ty Fatal1ty released this 31 Jul 11:42
· 1075 commits to master since this release

Changes

  • Added support for TypeVar types. It works like Union under the hood and both constraints and upper bound can be used to specify a variation of types. Similarly to Union it's recommended to place more complex variant types at first place like TypeVar("T", Dict[int, int], List[int]) not TypeVar("T", List[int], Dict[int, int]).
  • Added support for short version of standard generic types without specifying type of objects kept in containers. Now it's possible to use List instead of List[Any] or Dict instead of Dict[Any, Any].
  • Improved string representation of builtin and standard generic types. Now in the error messages you will see int instead of builtins.int or List instead of typing.List.