Message165307
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>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2012-07-12 15:05:19 | roger.serwy | set | recipients:
+ roger.serwy, loewis, terry.reedy, serhiy.storchaka |
2012-07-12 15:05:18 | roger.serwy | link | issue15318 messages |
2012-07-12 15:05:18 | roger.serwy | create | |
|