Stefan Krah <stefan-use...@bytereef.org> added the comment: I wonder if this is technically a bug. The stream is not opened for reading and yet you do an fread. I quickly glanced through the C-Standard and I did not find an _explicit_ paragraph that this is undefined behavior, but personally I'd expect it to be.
Regarding the last C example. Also here, you do not open using "w+". Now, even if you used "w+", by the standard you'd have to do an fflush, fseek, fsetpos or rewind before reading. I don't see a libc bug. ---------- nosy: +skrah _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5677> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com