Syntax for class keyword in HTMLgen
google at jgarza.net
Sun Feb 23 01:16:59 CET 2003
Duncan Booth <duncan at NOSPAMrcp.co.uk> wrote in message news:<Xns93295BFCBC0Fduncanrcpcouk at 127.0.0.1>...
> 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.
HTMLgen does indeed downcase the HTML attribute keywords, so using
CLASS did the trick. Thanks to all!
More information about the Python-list