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

Method checklinecache

Lib/idlelib/pyshell.py:743–748  ·  view source on GitHub ↗

Remove keys other than ' '.

(self)

Source from the content-addressed store, hash-verified

741 self.tkconsole.open_stack_viewer()
742
743 def checklinecache(self):
744 "Remove keys other than '<pyshell#n>'."
745 cache = linecache.cache
746 for key in list(cache): # Iterate list because mutate cache.
747 if key[:1] + key[-1:] != "<>":
748 del cache[key]
749
750 def runcommand(self, code):
751 "Run the code without invoking the debugger"

Callers 2

showtracebackMethod · 0.95
runcodeMethod · 0.95

Calls 1

listClass · 0.85

Tested by

no test coverage detected