On Sun, Jul 3, 2011 at 1:32 PM, Matt Feifarek <matt.feifa...@gmail.com> wrote:
> Hi there.
> I want to make a tag like this:
>
> <form action="go" accept-charset="utf-8" class="goform">
> Of course, "accept-charset" is an expression in Python, not a valid
> identifier. I'm aware that for reserved words, we append an underscore
> (class -> class_) but is there a proper way to send "accept-charset"?
> I ended up with this, but it seems not the nicest way:
>
> tags.form("go", class_="goform", **{'accept-charset':"utf-8"})

Thatt's the proper way. I suppose we could change it to replace '_' in
the keyword args with '-', if people think it's a generally good idea.


-- 
Mike Orr <sluggos...@gmail.com>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to