You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sorry for being sloppy ( the 'typevars' in the above example are the result of copy-pasta...)
my actual use case for module is for "generating Typescript-interface code with python project structure nearly intact"
(so a ValidatedEmail inside py_proj/types/user.py will result in a nominal-type in generated_ts_proj/types/user.ts file)
Anyway, for there's no way, do you mean:
it can't be backported ( can't do pip install -U typing, so this will require newer python version (py3.11+?)
current typing project isn't designed for this (impossible / may take big overhaul)
in some related discussion from other repo, there's mention of "we can probably backport..." --- is this even possible?
(maybe they're thinking of monkey-patching the typing module before everything else runs?)
I'm not actually a python-person, so I'm not very familiar with the python-internals 😭
Activity
gvanrossum commentedon Sep 26, 2020
There is no way, and this is not a desirable use case. (Also, you're using the term "typevar" wrong. :-)
devdoomari3 commentedon Sep 27, 2020
sorry for being sloppy ( the 'typevars' in the above example are the result of copy-pasta...)
my actual use case for
moduleis for "generating Typescript-interface code with python project structure nearly intact"(so a
ValidatedEmailinsidepy_proj/types/user.pywill result in a nominal-type ingenerated_ts_proj/types/user.tsfile)Anyway, for
there's no way, do you mean:pip install -U typing, so this will require newer python version (py3.11+?)in some related discussion from other repo, there's mention of "we can probably backport..." --- is this even possible?
(maybe they're thinking of monkey-patching the
typingmodule before everything else runs?)I'm not actually a python-person, so I'm not very familiar with the python-internals 😭
gvanrossum commentedon Sep 27, 2020