Alexander Belopolsky <[email protected]> added the comment:
> If we want to allow for closed {stdin, stdout, stderr}, I'm not sure
> what the semantics should be. Should sys.std{in, out, err} be None? Or a
> file object which always throws an error?
I would say it should be a *pseudo*-file object which always throws a
*descriptive* error. Note that setting sys.stdout to None makes print() do
nothing rather than report an error:
>>> sys.stdout = None
>>> print('abc')
See also issue6501.
----------
nosy: +belopolsky
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7111>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com