Mercurial > cpython-lru_cache-weakref
diff Lib/idlelib/PyShell.py @ 78045:4f891f44ec15 2.7
Issue 13532: Allow bytearrays to be written also.
| author | Terry Jan Reedy <tjreedy@udel.edu> |
|---|---|
| date | Mon, 09 Jul 2012 17:57:13 -0400 |
| parents | 2993f566c82e |
| children | fa7d4ecc6357 |
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py Mon Jul 09 21:07:41 2012 +0200 +++ b/Lib/idlelib/PyShell.py Mon Jul 09 17:57:13 2012 -0400 @@ -1265,8 +1265,8 @@ 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):
