Message261177
> I wonder why they forward references are evaluated *at all* at this point.
The Union type tries to reduce the set of allowed types by removing any subclasses (so Union[int, bool] becomes Union[int] only). That's all fine, but it should not at that point fail if a forward reference is not available yet.
Arguably, the except NameError there should be converted to a except Exception, since forward references are supposed to be *a valid Python expression [...] and it should evaluate without errors once the module has been fully loaded.* (from the PEP); anything goes, and thus any error goes until the module is loaded. |
|
Date |
User |
Action |
Args |
2016-03-03 18:38:13 | mjpieters | set | recipients:
+ mjpieters, alex.gronholm, ztane |
2016-03-03 18:38:13 | mjpieters | set | messageid: <1457030293.4.0.045702233785.issue26477@psf.upfronthosting.co.za> |
2016-03-03 18:38:13 | mjpieters | link | issue26477 messages |
2016-03-03 18:38:13 | mjpieters | create | |
|