◐ Shell
clean mode source ↗

Message 391770 - Python tracker

Perhaps eval_str=ONLY_IF_STRINGIZED should also add the semantics "if evaluating any string fails, behave as if eval_str=false".  I would *not* propose adding that for eval_str=true.  But people keep asking for this.  Hmm.

The heuristic is a tricky thing.  That's why in my "PEP 1212" idea I proposed a way that a function like get_annotations() could determine unambiguously whether or not the annotations for an object were stringized.  (And, if we did do something like that in a future Python version, this would also change the "if evaluating any string fails" behavior I just proposed.)