PyMeld and PyMeldLite (was Re: Separation of content and code for web)

Duncan Booth duncan at NOSPAMrcp.co.uk
Wed Dec 3 11:12:02 CET 2003


Richie Hindle <richie at entrian.com> wrote in 
news:mailman.53.1070384810.16879.python-list at python.org:

> Yes.  `element.class = something` is an example that one PyMeld user ran
> into.  You need to say `setattr(element, 'class', something)`, which is
> messy. 

For HTML generation could you also take advantage of the fact that 
attributes are case insensitive and do `element.Class = something`?

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?




More information about the Python-list mailing list