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

Method __call__

Lib/_sitebuiltins.py:19–26  ·  view source on GitHub ↗
(self, code=None)

Source from the content-addressed store, hash-verified

17 def __repr__(self):
18 return 'Use %s() or %s to exit' % (self.name, self.eof)
19 def __call__(self, code=None):
20 # Shells like IDLE catch the SystemExit, but listen when their
21 # stdin wrapper is closed.
22 try:
23 sys.stdin.close()
24 except:
25 pass
26 raise SystemExit(code)
27
28
29class _Printer(object):

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected