Hacker News new | ask | show | jobs
by callamdelaney 820 days ago
That's very nice, I wonder if we can write a sort of dsl for this in python.
1 comments

The problem with this is that it doesn’t map nicely to HTML (or more generally XML) as do s-expressions.
My https://pypi.org/project/xml-from-seq/ is a simple mapper from e.g.

    ['p', 'This is a ', ['a', {'href': 'https://example.com'}, 'link']]
to

    <p>This is a <a href="https://example.com">link</a></p>