[Python-checkins] cpython (2.7): Widen test to support unicode.
martin.v.loewis
python-checkins at python.org
Mon Jul 9 21:08:03 CEST 2012
http://hg.python.org/cpython/rev/2993f566c82e
changeset: 78037:2993f566c82e
branch: 2.7
user: Martin v. Löwis <martin at v.loewis.de>
date: Mon Jul 09 21:07:41 2012 +0200
summary:
Widen test to support unicode.
files:
Lib/idlelib/PyShell.py | 2 +-
Lib/idlelib/run.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1265,7 +1265,7 @@
self.encoding = encoding
def write(self, s):
- if not isinstance(s, str):
+ if not isinstance(s, basestring):
raise TypeError('must be str, not ' + type(s).__name__)
self.shell.write(s, self.tags)
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -263,7 +263,7 @@
return setattr(self.rpc, name, value)
def write(self, s):
- if not isinstance(s, str):
+ if not isinstance(s, basestring):
raise TypeError('must be str, not ' + type(s).__name__)
return self.rpc.write(s)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list