Syntax for class keyword in HTMLgen
Duncan Booth
duncan at NOSPAMrcp.co.uk
Fri Feb 21 04:10:06 EST 2003
google at jgarza.net (sgtpepper) wrote in
news:88e6fe6b.0302202200.6f84c81e at posting.google.com:
> I get 'Syntax error: invalid syntax' with the error 'pointer'
> pointing to the 'c' in 'class' since it is a reserved keyword.
>
> Any ideas?
I haven't used HTMLgen myself, but a quick look at the code seems to
indicate that it lowercases all the attribute names. Since the 'lets make
Python case insensitive' movement haven't yet won the day, you could try:
div = Div( align="left", CLASS="myclass" )
or any mixed casing that appeals.
--
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