This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients Guido.van.Rossum, The Compiler, eric.smith, gvanrossum, kj, larry, levkivskyi
Date 2021-04-16.20:47:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618606046.0.0.710122988506.issue43463@roundup.psfhosted.org>
In-reply-to
Content
I admit I hadn't looked that closely at Jelle's PR.  You're right, its effects on code size should be minimal.

If I'm reading it correctly, Jelle's PR would suppress NameError by replacing the failed value with a new "AnnotationName" object.  It wouldn't handle any other exceptions (e.g. ValueError).

Also, as currently implemented it doesn't permit getting attributes or indexing into the AnnotationName--if "o" is the object we failed to look up, "o.value" and "o[1]" would raise exceptions.  The AnnotationName could be extended with __getattr__ and __getitem__, but this makes it even more opinionated.

Also, the PR only adds LOAD_ANNOTATION_GLOBAL; it would presumably also need LOAD_ANNOTATION_NAME and LOAD_ANNOTATION_CLASSDEREF.  (I don't think we'd need LOAD_ANNOTATION_LOCAL.)

I'll file these comments on the PR.
History
Date User Action Args
2021-04-16 20:47:26larrysetrecipients: + larry, gvanrossum, eric.smith, Guido.van.Rossum, The Compiler, levkivskyi, kj
2021-04-16 20:47:26larrysetmessageid: <1618606046.0.0.710122988506.issue43463@roundup.psfhosted.org>
2021-04-16 20:47:25larrylinkissue43463 messages
2021-04-16 20:47:25larrycreate