MCPcopy Index your code
hub / github.com/RustPython/RustPython / MyContainingClass

Class MyContainingClass

extra_tests/snippets/operator_membership.py:58–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58class MyContainingClass:
59 def __init__(self, value):
60 self.value = value
61
62 def __contains__(self, something):
63 return something == self.value
64
65
66assert 2 in MyContainingClass(2)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected