Terry J. Reedy added the comment:

I think PseudoXxxFile should have close methods, but that the methods should 
not be called when they should not be. Rebinding sys.stdin should not close 
command line input.

My perhaps naive thought is that initializing sys.__stdin__ to the original 
sys.stdin, as in the standard interpreter and as specified in the docs, is the 
proper place for the extra reference to keep PseudoInputFile alive. (I presume 
we are talking about the object in the user process.) While the sys module doc 
says that any of sys.std** and sys.__std**__ can be None on Windows pythonw gui 
apps, that does not make None a good idea ;-).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17838>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to