Vajrasky Kok added the comment:
Why limit to str and bytes. Open can accept integer as well. I am asking not
suggesting.
>>> with open('/tmp/cutecat.txt', 'wb') as f:
... f.write(b'cutecat')
...
7
>>> a = open('/tmp/cutecat.txt')
>>> a.fileno()
3
>>> b = open(3)
>>> b.read()
'cutecat'
----------
nosy: +vajrasky
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19997>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com