Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15950
___
___
Python-bugs-list mailing list
New submission from Lars Gustäbel:
Today I accidentally did this:
open(True).read()
Passing True as a file argument to open() does not fail, because a bool value
is treated like an integer file descriptor (stdout in this case). Even worse is
that the read() call hangs in an endless loop on
R. David Murray added the comment:
I don't think so. We don't try to protect people from all their mistakes, and
a file descriptor of 1 is valid, and True == 1.
--
nosy: +r.david.murray
resolution: - wont fix
stage: - committed/rejected
status: open - closed