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 va
(self, key, default=None)
| 340 | self.text = self.tail = None |
| 341 | |
| 342 | def get(self, key, default=None): |
| 343 | """Get element attribute. |
| 344 | |
| 345 | Equivalent to attrib.get, but some implementations may handle this a |
| 346 | bit more efficiently. *key* is what attribute to look for, and |
| 347 | *default* is what to return if the attribute was not found. |
| 348 | |
| 349 | Returns a string containing the attribute value, or the default if |
| 350 | attribute was not found. |
| 351 | |
| 352 | """ |
| 353 | return self.attrib.get(key, default) |
| 354 | |
| 355 | def set(self, key, value): |
| 356 | """Set element attribute. |
no outgoing calls
no test coverage detected