Comment 1 for bug 1678589

Revision history for this message
Leonard Richardson (leonardr) wrote :

I sympathize with what you're saying but I'm not going to change the behavior of Tag.get(). There are a lot of things you might do with attributes and the simplest way to handle it overall is to model what actually goes on in an HTML document: some attributes, like class and rel, have a list of values, and others can only have one value.

In revision 445 I've added a convenience method called Tag.get_attribute_text, which will automatically join the values of multi-valued attributes into a single string, similar to how Tag.get_text joins the strings found inside a tag into a single string.