MCPcopy Index your code
hub / github.com/python/cpython / resolve_interp

Method resolve_interp

Lib/test/test__interpchannels.py:152–170  ·  view source on GitHub ↗
(self, interp, other, extra)

Source from the content-addressed store, hash-verified

150 return self.end
151
152 def resolve_interp(self, interp, other, extra):
153 if self.interp == 'same':
154 return interp
155 elif self.interp == 'other':
156 if other is None:
157 raise RuntimeError
158 return other
159 elif self.interp == 'extra':
160 if extra is None:
161 raise RuntimeError
162 return extra
163 elif self.interp == 'main':
164 if interp.name == 'main':
165 return interp
166 elif other and other.name == 'main':
167 return other
168 else:
169 raise RuntimeError
170 # Per __init__(), there aren't any others.
171
172
173class ChannelState(namedtuple('ChannelState', 'pending closed')):

Callers 1

run_actionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected