Open Daraan opened 1 month ago
The code could be slimmed down in some cases if we introduce __typing_subst__
and __typing_prepare_subst__
, was there a decision against introducing them?
The code could be slimmed down in some cases if we introduce
__typing_subst__
and__typing_prepare_subst__
, was there a decision against introducing them?
Not that I'm aware of. But I think functions in typing.py and elsewhere don't pay attention to these hooks on Python less than 3.11(?), so it might be less effective to add them than you might think. (I'm not confident in this opinion, definitely try it out if you think it might work!)
this PR is is a follow up on #491 and addresses multiple locations that case problems for different situations and versions; see comments below.