-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am working in a branch #1
Comments
Progress! I now have something working:
Note that the final example is incorrect -- it should call |
More progress! (I am using #5 for now, and the 'x + 1' is calculated using the unparse functionality.)
|
I have a working demo that implements an
You can interpolate variables or expressions; and there isn't a
Special characters in interpolations are properly escaped:
You can also interpolate other
If you somehow wanted to escape an
You can also interpolate attribute values:
Although best practice here is to put quotes in the HTML:
NEW! You can also interpolate lists of
Here's the text of the demo: https://gist.github.com/gvanrossum/a465d31d9402bae2c79e89b2f344c10c |
I tried the demo, and it works! In particular, as expected, by using lexical scope, this solves the scoping issue that Paul Everitt mentions in jviide/htm.py#11 (which comes from the need to use dynamic scoping with
which results in
|
I'll need to give that a try and compare the performance change. |
Another thing to compare is pyxl https://github.com/awable/pyxl . |
Closing in favor of #22. |
https://github.com/gvanrossum/cpython/tree/tag-strings
(Or in draft PR form: python/cpython#103766)
The text was updated successfully, but these errors were encountered: