MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / __contains__

Method __contains__

markdown/util.py:315–320  ·  view source on GitHub ↗
(self, item: str | _T)

Source from the content-addressed store, hash-verified

313 self._is_sorted = False
314
315 def __contains__(self, item: str | _T) -> bool:
316 if isinstance(item, str):
317 # Check if an item exists by this name.
318 return item in self._data.keys()
319 # Check if this instance exists.
320 return item in self._data.values()
321
322 def __iter__(self) -> Iterator[_T]:
323 self._sort()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected