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 -- http://mail.python.org/mailman/listinfo/python-list