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)
New submission from Mo Ali:
Python3 open(), read(), or write()doesn't check argument type before action
causing a hang. Would like to catch exceptions but not without an exception to
return. See below.
Python3.6:
Python 3.6.0 (default, Dec 24 2016, 08:01:42)
[GCC 4.2.1 Compatible Apple