Erik Bray <erik.m.b...@gmail.com> added the comment:
For the sake of completeness, same deal in pure C: $ cat devnul.c #include <stdio.h> int main(void) { FILE *f = fopen("/dev/null", "w"); printf("tell() = %ld\n", ftell(f)); printf("write(\"abcdefgh\") = %zu\n", fwrite("abcdefgh", 1, 8, f)); printf("tell() = %ld\n", ftell(f)); printf("seek(8) = %d\n", fseek(f, 8, 0)); printf("tell() = %ld\n", ftell(f)); return 0; } $ gcc devnulc -o devnul $ ./devnull tell() = 0 write("abcdefgh") = 8 tell() = 8 seek(8) = 0 tell() = 0 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34904> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com