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

Method __init__

Lib/code.py:185–198  ·  view source on GitHub ↗

Constructor. The optional locals argument will be passed to the InteractiveInterpreter base class. The optional filename argument should specify the (file)name of the input stream; it will show up in tracebacks.

(self, locals=None, filename="<console>", *, local_exit=False)

Source from the content-addressed store, hash-verified

183 """
184
185 def __init__(self, locals=None, filename="<console>", *, local_exit=False):
186 """Constructor.
187
188 The optional locals argument will be passed to the
189 InteractiveInterpreter base class.
190
191 The optional filename argument should specify the (file)name
192 of the input stream; it will show up in tracebacks.
193
194 """
195 InteractiveInterpreter.__init__(self, locals)
196 self.filename = filename
197 self.local_exit = local_exit
198 self.resetbuffer()
199
200 def resetbuffer(self):
201 """Reset the input buffer."""

Callers

nothing calls this directly

Calls 2

resetbufferMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected