diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2012-07-09 21:57:13 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2012-07-09 21:57:13 (GMT) |
commit | f8fc674f0bc1819a85e64e1f3174b682260adab6 (patch) | |
tree | 97e42dfa9963e0f46560d656ddd046bb4ed5a6e2 /Lib/idlelib/PyShell.py | |
parent | 9e6bf1a8ee8ea9d7b187763c92cd500bc614fc64 (diff) | |
download | cpython-f8fc674f0bc1819a85e64e1f3174b682260adab6.zip cpython-f8fc674f0bc1819a85e64e1f3174b682260adab6.tar.gz cpython-f8fc674f0bc1819a85e64e1f3174b682260adab6.tar.bz2 |
Issue 13532: Allow bytearrays to be written also.
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r-- | Lib/idlelib/PyShell.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 3e23e6c..2bf97a5 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -1265,8 +1265,8 @@ class PseudoFile(object): self.encoding = encoding def write(self, s): - if not isinstance(s, basestring): - raise TypeError('must be str, not ' + type(s).__name__) + if not isinstance(s, (basestring, bytearray)): + raise TypeError('must be string, not ' + type(s).__name__) self.shell.write(s, self.tags) def writelines(self, lines): |