FelixTheC / strongtyping

Decorator which checks whether the function is called with the correct type of parameters.
https://pypi.org/project/strongtyping/
107 stars 3 forks source link

Prepare for PEP 563 #39

Closed FelixTheC closed 3 years ago

FelixTheC commented 3 years ago

Checkout future changes in PEP 563 https://www.python.org/dev/peps/pep-0563/

Possible solution to get the type of a string use eval(string, locals={}, globals={}) checkout -> https://www.python.org/dev/peps/pep-0563/#resolving-type-hints-at-runtime for more detailed informations

Testing To test with current version use from __future__ import annotations as described here -> https://www.python.org/dev/peps/pep-0563/#enabling-the-future-behavior-in-python-3-7