Get element attribute. Equivalent to attrib.get, but some implementations may handle this a bit more efficiently. *key* is what attribute to look for, and *default* is what to return if the attribute was not found. Returns a string containing the attribute value, o
(self, key, default=None)
| 332 | self.text = self.tail = None |
| 333 | |
| 334 | def get(self, key, default=None): |
| 335 | """Get element attribute. |
| 336 | |
| 337 | Equivalent to attrib.get, but some implementations may handle this a |
| 338 | bit more efficiently. *key* is what attribute to look for, and |
| 339 | *default* is what to return if the attribute was not found. |
| 340 | |
| 341 | Returns a string containing the attribute value, or the default if |
| 342 | attribute was not found. |
| 343 | |
| 344 | """ |
| 345 | return self.attrib.get(key, default) |
| 346 | |
| 347 | def set(self, key, value): |
| 348 | """Set element attribute. |
no outgoing calls