Closed FelixTheC closed 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
eval(string, locals={}, globals={})
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
from __future__ import annotations
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 informationsTesting 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