ANN: XML builder for Python
Jonas Galvez
jonas at codeazur.com.br
Thu Jul 3 11:12:17 EDT 2008
Walter Dörwald wrote:
> XIST has been using with blocks since version 3.0.
> [...]
> with xsc.Frag() as node:
> +xml.XML()
> +html.DocTypeXHTML10transitional()
> with html.html():
> [...]
Sweet! I don't like having to use the unary operator tho, I wanted
something as simple as possible, so I wouldn't even have to assign a
variable on the with block ("as something"). I plan to add some
validation and error checking, but for generating feeds for my Atom
store it's reasonably fast and lean (just over 50 lines of code).
--Jonas Galvez, http://jonasgalvez.com.br/log
More information about the Python-list
mailing list