Le 12/04/2021 à 03:55, Larry Hastings a écrit :
I look forward to your comments,
2 reading notes:
* in section "Annotations That Refer To Class Variables":
If it's possible that an annotation function refers to class variables--if all these conditions are true:
- The annotation function is being defined inside a class scope.
- The generated code for the annotation function has at least one ``LOAD_NAME`` instruction.
I'm afraid I don't really understand the second condition. Would it be possible to rephrase it in a less technical way, i.e. some condition on the user code itself, not on what the implementation does with it.
* in section "Interactive REPL Shell":
For the sake of simplicity, in this case we forego delayed evaluation.
This has the unpleasant consequence that any code using forward references cannot be copy-pasted into the REPL. While such copy-pasting is a very casual practice and does already often break, it is sometimes useful in quick'n dirty prototyping. Would it be possible to specify that in this case, a possible NameError in evaluation is caught, and the annotation is set to None or some sentinel value?