Mercurial > cpython-lru_cache-weakref
diff Lib/idlelib/PyShell.py @ 42571:7a45e8b78d63
Expect that source strings are Unicode.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Mon, 13 Aug 2007 06:03:15 +0000 |
| parents | 3e682ae9d298 |
| children | 2ec16b6b4d04 |
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py Mon Aug 13 06:02:38 2007 +0000 +++ b/Lib/idlelib/PyShell.py Mon Aug 13 06:03:15 2007 +0000 @@ -586,14 +586,16 @@ self.more = 0 self.save_warnings_filters = warnings.filters[:] warnings.filterwarnings(action="error", category=SyntaxWarning) - if isinstance(source, types.UnicodeType): - from . import IOBinding - try: - source = source.encode(IOBinding.encoding) - except UnicodeError: - self.tkconsole.resetoutput() - self.write("Unsupported characters in input\n") - return + # at the moment, InteractiveInterpreter expects str + assert isinstance(source, str) + #if isinstance(source, str): + # from . import IOBinding + # try: + # source = source.encode(IOBinding.encoding) + # except UnicodeError: + # self.tkconsole.resetoutput() + # self.write("Unsupported characters in input\n") + # return try: # InteractiveInterpreter.runsource() calls its runcode() method, # which is overridden (see below)
