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

Method call

Lib/concurrent/interpreters/__init__.py:225–238  ·  view source on GitHub ↗

Call the object in the interpreter with given args/kwargs. Nearly all callables, args, kwargs, and return values are supported. All "shareable" objects are supported, as are "stateless" functions (meaning non-closures that do not use any globals). This method will

(self, callable, /, *args, **kwargs)

Source from the content-addressed store, hash-verified

223 return res
224
225 def call(self, callable, /, *args, **kwargs):
226 """Call the object in the interpreter with given args/kwargs.
227
228 Nearly all callables, args, kwargs, and return values are
229 supported. All "shareable" objects are supported, as are
230 "stateless" functions (meaning non-closures that do not use
231 any globals). This method will fall back to pickle.
232
233 If the callable raises an exception then the error display
234 (including full traceback) is sent back between the interpreters
235 and an ExecutionFailed exception is raised, much like what
236 happens with Interpreter.exec().
237 """
238 return self._call(callable, args, kwargs)
239
240 def call_in_thread(self, callable, /, *args, **kwargs):
241 """Return a new thread that calls the object in the interpreter.

Callers 2

_callMethod · 0.45
runMethod · 0.45

Calls 1

_callMethod · 0.95

Tested by

no test coverage detected