On Sat, Dec 17, 2022 at 10:10 AM <e...@emilstenstrom.se> wrote: > > I replied to this in a separate post, but html() is likely a function name > that is used in millions of existing code bases. Applying this rule to all > of them will lead to too many errors to be acceptable to editors I think. > And if this has to be explicitly configured in an editor very few will use > it. >
Understood. This string suffix syntax is supported by Python today and syntax highlighters could be modified to support this without requiring changes to any other component. class Calendar(component.Component): template_string = '<span class="calendar"></span>' ##html css_string = '.calendar { background: pink }' ##css js_string = 'document.getElementsByClassName("calendar")[0].onclick = function() { alert("click!") }' ##javascript --- Bruce
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/UHFXAYTAXLEX2DIV55GIJDW2K5TXUCMG/ Code of Conduct: http://python.org/psf/codeofconduct/