18 Jan
2021
18 Jan
'21
8:31 p.m.
On 19/01/21 1:13 pm, Inada Naoki wrote:
I don't want to import modules used only in type hints. I don't want to import even "typing".
How about having a pseudo-module called __typing__ that is ignored by the compiler: from __typing__ import ... would be compiled to a no-op, but recognised by type checkers. If you want to do run-time typing stuff, you would use from typing import ... -- Greg