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

Method __contains__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected