Syntax for class keyword in HTMLgen

sgtpepper google at jgarza.net
Fri Feb 21 01:00:43 EST 2003


Relatively new to Python, so be gentle.

What is the proper syntax for the 'class' keyword in HTMLgen?

div = Div( style="color:white;" )
# expected HTML <DIV style="color:white;"></DIV>

div = Div( align="left", class="myclass" )
# hoped-for HTML <DIV align="left" class="myclass"></DIV>

I get 'Syntax error:  invalid syntax' with the error 'pointer'
pointing to the 'c' in 'class' since it is a reserved keyword.

Any ideas?




More information about the Python-list mailing list