I want to extend the forms module but I'm going in a bit of a
different direction. I'd like to use the AttributeList class but I'm
not going to be inheriting from the Input class. The problem is if I
try to pass in a css class as an attribute. The special case of class_
is handled in Input's __init__, I'd rather not have to deal with this
special case in my classes. I'm wondering if I could push the class_
to class case into AttributeList with:
def __str__(self):
return " ".join(['%s="%s"' % (k if k[-1:] != '_' else k[:-1],
net.websafe(v)) for k, v in self.items()])
without running into unanticipated consequences? Would some of the
more experienced Web.py users mind commenting?
Obviously this will require python 2.5 or higher but that is not a
concern for me.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.