Author: martin.v.loewis
Date: Mon Aug 13 08:03:15 2007
New Revision: 56976
Modified:
python/branches/py3k/Lib/idlelib/PyShell.py
Log:
Expect that source strings are Unicode.
Modified: python/branches/py3k/Lib/idlelib/PyShell.py
==============================================================================
--- python/branches/py3k/Lib/idlelib/PyShell.py (original)
+++ python/branches/py3k/Lib/idlelib/PyShell.py Mon Aug 13 08:03:15 2007
@@ -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)
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins