I think Cython 3.0 would also be a good time to implement PEP-563 ("Postponed Evaluation of Annotations"). There already is a Cython code generator in Cython.CodeWriter
that can be used to generate the expression string. This should be done somewhat late in the compiler pipeline since some optimisations can make use of the annotation information. It might be worth creating a separate transformation before the code generation.
What needs to be done:
class SerialiseAnnotations(VisitorTransform)
in ParseTreeTransforms.py
.ExprNode
, and anything that has an annotation
attribute in Nodes.py
).node.annotation
with a StringNode' (or
UnicodeNode` ?) that wraps the string value.Pipeline.py
, rather late, before the final checks.tests/run/
to cover the annotation string value. Add new tests for expressions that are not covered yet.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4