SilentGhost added the comment:
As explained in the docs[1] integer is a valid argument for the open function
in the python3. It is also noted that the file descriptor is going to be
closed, unless closefd argument to the open function was False, when f.close()
is called. This is the behaviour
New submission from Ievgen Aleinikov:
HI,
I was able to gat such behaviour on python version 3.4.2 and 3.2.3
>>> for i in range(10):
... f = open(i, "w")
... f.close()
...
This will close interactive session without any output.
On python 2 (2.7.9) it's not happening:
>>> for i in range(10