3 ms·
A pseudocode python variant could look like with xml.element("port") as e: e.attribute("name", name) e.attribute("location", location) And th
by atoav 3y ago
A pseudocode python variant could look like
with xml.element("port") as e:
e.attribute("name", name)
e.attribute("location", location)
And that's it
- pphysch 3y agoPretty much how https://github.com/Knio/dominate https://github.com/Knio/dominate does it, but no context variable binding (otherwise gets messy with lots of nesting)