[issue29297] python3 open() does not check argument type before attempting to read() or write()
Mo Ali
report at bugs.python.org
Tue Jan 17 10:10:11 EST 2017
Mo Ali added the comment:
Serhiy,
I expected a type error or a filenotfound like you received, however mine doesn't return the same. It just hangs. I've attached a picture. Also, I meant this to be for 3.6 not 3.5.
>>> test = False
>>> with open(test) as f:
... fail = f.read()
...
----------
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file46315/Screen Shot 2017-01-17 at 10.09.35 AM.png
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29297>
_______________________________________
More information about the Python-bugs-list
mailing list