First, I’d like to thank everyone who worked on this PEP.
EDIT 2: transformed this suggestion in it’s own thread.
I would like to chime in with the idea of using a different keyword for type-only imports, as they will never be evaluated (reified?). This should make it clearer for readers to understand that it is an import that only exists for type checking reasons.
For example:
from typing import type Dict
I know there is the type
keyword already, so maybe another word could be used in place.
I’m unsure if commenting here is the best option to suggest this, or if this should be in it’s own PEP, in which case I would probably not follow with it, as I don’t see any performance changes (maybe very small since the type imports would never be evaluated, but that’s probably irrelevant).
Again, thanks to everyone involved in this PEP! Looking forward for this being introduced into Python!
EDIT: I had previously sent an email to Pablo, since I was unsure about where to send suggestions regarding PEPs, and he replied with some very good points to have this as another PEP instead of using this one. I will for sure read PEP 1 and 12 to understand how I can get started with this. Amazing work on this one!