3 ms·
Please note that the docs are completely static. Because they are static, I could have generated these docs by just writing a function that returned the whole
by ljlolel 16y ago
Please note that the docs are completely static. Because they are static, I could have generated these docs by just writing a function that returned the whole html string, which would be a small constant overhead. The only reason I used Weby Templates is to show off the features.
In a normal programmatic setting, you would have significant if/else constructs and looping. These templates would be significantly shorter than hard-coded HTML, and still shorter than the popular Jinja, Django, and ERB templates because
1. they close tags for you in a Pythonic way.
2. it is trivial to create functions and filters to do repetitive tasks for you, whereas they can be difficult, hard to locate, or a pain to do with the others.