Author mjpieters
Recipients alex.gronholm, mjpieters, ztane
Date 2016-03-03.18:38:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457030293.4.0.045702233785.issue26477@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2016-03-03 18:38:13mjpieterssetrecipients: + mjpieters, alex.gronholm, ztane
2016-03-03 18:38:13mjpieterssetmessageid: <1457030293.4.0.045702233785.issue26477@psf.upfronthosting.co.za>
2016-03-03 18:38:13mjpieterslinkissue26477 messages
2016-03-03 18:38:13mjpieterscreate