4 ms·
Can we also have multi line lambdas? It will make loops in trees of components (html, UI etc) easier. Generating html in Python will look much better than: ```
by aitchnyu 3y ago
Can we also have multi line lambdas? It will make loops in trees of components (html, UI etc) easier. Generating html in Python will look much better than:
```
with lib.html():
with lib.body():
with lib.ul():
for i in items:
with lib.li():
lib.add(i)
```
- Kim_Bruning 3y agoThat lib looks very useful in and of itself! Are you thinking of a particular one?
- aitchnyu 3y agoThat was pseudocode. There are tons of libraries like https://pypi.org/project/dominate/ https://pypi.org/project/dominate/