diff -r 713db33a4ebc Lib/idlelib/PyShell.py --- a/Lib/idlelib/PyShell.py Sat Mar 10 23:43:12 2012 +0100 +++ b/Lib/idlelib/PyShell.py Sun Mar 11 16:49:41 2012 -0500 @@ -1241,6 +1241,8 @@ self.encoding = encoding def write(self, s): + if not isinstance(s, str): + raise TypeError('must be str, not %s' % type(s)) self.shell.write(s, self.tags) def writelines(self, lines):

AltStyle によって変換されたページ (->オリジナル) /