Ezio Melotti <ezio.melo...@gmail.com> added the comment: fd support is intentional, see Modules/_io/_iomodule.c:318
OTOH closing sys.stdin doesn't exit Python, so I'm not sure why closing fd 0 should. I was also thinking about possible security implications of this, but if someone tries to pass '0' as filename, it will most likely be passed to open as a string. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12969> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com