Eryk Sun <[email protected]> added the comment:
You're mistaken about what `fd` is. It's a TextIOWrapper, which wraps a
BufferedWriter, which buffers a FileIO raw file object, which accesses the open
file number fd.fileno(). For example:
>>> f = open('tmp.tmp','w')
>>> os.stat(f.fileno()).st_size
0
----------
nosy: +eryksun
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue47198>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com