4 ms·
The type hints work with older Python 3 versions. They just get ignored and mypy can use them. However the type hinting syntax for Python 2 isn't the same. For
by dveeden2 7y ago
The type hints work with older Python 3 versions. They just get ignored and mypy can use them. However the type hinting syntax for Python 2 isn't the same. For Python 2 you have to use comments. I don't think there is a way to convert between Python 2 and Python 3. Maybe a good reason to say goodbye to Python 2.