| 275 | return term |
| 276 | |
| 277 | def __contains__(self, term): |
| 278 | # Check if the term is in the dictionary. |
| 279 | # If the term is not in the dictionary, check the classifiers. |
| 280 | term = self._normalize(term) |
| 281 | if dict.__contains__(self, term): |
| 282 | return True |
| 283 | for classifier in self.classifiers: |
| 284 | if classifier.parents(term) \ |
| 285 | or classifier.children(term): |
| 286 | return True |
| 287 | return False |
| 288 | |
| 289 | def append(self, term, type=None, value=None): |
| 290 | """ Appends the given term to the taxonomy and tags it as the given type. |