Message165307
| Author |
roger.serwy |
| Recipients |
loewis, roger.serwy, serhiy.storchaka, terry.reedy |
| Date |
2012年07月12日.15:05:18 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<4FFEE7AA.1060101@gmail.com> |
| In-reply-to |
<1342084453.14309.35.camel@raxxla> |
| Content |
On 07/12/2012 04:13 AM, Serhiy Storchaka wrote:
> Serhiy Storchaka<storchaka@gmail.com> added the comment:
>
>> sys.stdin.write returns the wrong error message when passed a non-string. Presently it returns io.UnsupportedOperation instead of TypeError: must be str, not ...
> It's not a bug. sys.stdin.write raises io.UnsupportedOperation in
> standard interpreter.
Here's what I get from the standard interpreter:
Python 3.3.0b1 (default:4752fafb579d, Jul 11 2012, 22:05:03)
[GCC 4.5.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.stdin.write(123)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be str, not int
>>>
> ----------
>
> _______________________________________
> Python tracker<report@bugs.python.org>
> <http://bugs.python.org/issue15318>
> _______________________________________
> |
|