pauleveritt / tagstr-site

Demos and docs for the draft PEP on tag strings in Python.
MIT License
5 stars 2 forks source link

HTML: Document inner-outer #7

Open pauleveritt opened 4 months ago

pauleveritt commented 4 months ago

From Jim: "Evaluation of interpolations - the lambda wrapped expressions - is generally not visible for well behaved code if it is fully evaluated by the tag string. (So this excludes the lazy f-string example.) However, we can control the order of evaluation of the interpolations so instead of inner to outer in typical function evaluation, we have outer to inner. This difference allows for incremental generation of text such as is supported by WSGI - and performed by Jinja's own compilation process. Note there's nothing special going on here - we just write out before we write out what it contains, for example. The second big aha."