8000 Clean PyShell.runsource of unneeded assert and comments. · python/cpython@d5849ad · GitHub
[go: up one dir, main page]

Skip to content

Commit d5849ad

Browse files
committed
Clean PyShell.runsource of unneeded assert and comments.
1 parent b72612a commit d5849ad

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

Lib/idlelib/pyshell.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -671,18 +671,8 @@ def execfile(self, filename, source=None):
671671
self.runcode(code)
672672

673673
def runsource(self, source):
674-
"Extend base class method: Stuff the source in the line cache first"
674+
"Return overriden base call after caching source."
675675
filename = self.stuffsource(source)
676-
# at the moment, InteractiveInterpreter expects str
677-
assert isinstance(source, str)
678-
#if isinstance(source, str):
679-
# from idlelib import iomenu
680-
# try:
681-
# source = source.encode(iomenu.encoding)
682-
# except UnicodeError:
683-
# self.tkconsole.resetoutput()
684-
# self.write("Unsupported characters in input\n")
685-
# return
686676
# II.runsource() calls .runcode(), overridden below.
687677
with warnings.catch_warnings():
688678
warnings.filterwarnings('once')

0 commit comments

Comments
 (0)
0