Returns the value of the 'key' attribute for the tag, or the value given for 'default' if it doesn't have that attribute.
(self, key, default=None)
| 941 | raise ValueError("Tag.index: element not in tag") |
| 942 | |
| 943 | def get(self, key, default=None): |
| 944 | """Returns the value of the 'key' attribute for the tag, or |
| 945 | the value given for 'default' if it doesn't have that |
| 946 | attribute.""" |
| 947 | return self.attrs.get(key, default) |
| 948 | |
| 949 | def has_attr(self, key): |
| 950 | return key in self.attrs |
no outgoing calls