MCPcopy Create free account
hub / github.com/twisted/twisted / __contains__

Method __contains__

src/twisted/python/modules.py:727–738  ·  view source on GitHub ↗

Check to see whether or not a module exists on my import path. @param module: The name of the module to look for on my import path. @type module: C{str}

(self, module)

Source from the content-addressed store, hash-verified

725 raise KeyError(modname)
726
727 def __contains__(self, module):
728 """
729 Check to see whether or not a module exists on my import path.
730
731 @param module: The name of the module to look for on my import path.
732 @type module: C{str}
733 """
734 try:
735 self.__getitem__(module)
736 return True
737 except KeyError:
738 return False
739
740 def __repr__(self) -> str:
741 """

Callers

nothing calls this directly

Calls 1

__getitem__Method · 0.95

Tested by

no test coverage detected