[py-dev] handling of 'class' attribute by py.xml.html
William McVey
wam at cisco.com
Thu Jun 9 00:20:30 CEST 2005
On Wed, 2005-06-08 at 16:59, holger krekel wrote:
> However,
> html.div(class_="somestyleclass")
>
> does produce '<div class="somestyleclass"></div>' as expected.
Ahhh, that's perfect.
> Here you are modifying the html.Style class which
> does not refer to the example you gave above.
> However, a Style object should not contain a css 'class'
> anyway. Can you post a more real-life example to show
> the problem you are hitting?
Well, the example I gave pretty much was the real-world example. I
needed to put 'class' attributes on html object elements. You're right
though, my patch wasn't the solution I had written to solve this
earlier. Your solution (trailing underscore) works just fine though so
I'm not going to bother finding the hack I had originally come up with
though.
Thanks again.
-- William
More information about the Pytest-dev
mailing list