New submission from Nick Jacobson: In Python 2.7.8.10 running the following gives one result:
>>> with open(r"C:\myfile.txt", "a+") as f: ... f.tell() ... 0L But in Python 3.4.1.0 it gives a different result: >>> with open(r"C:\myfile.txt", "a+") as f: ... f.tell() ... 98 According to the man page for fopen, for a+ mode: "The initial file position for reading is at the beginning of the file." Source: http://linux.die.net/man/3/fopen ---------- components: IO messages: 229511 nosy: nicksjacobson priority: normal severity: normal status: open title: Open file in a+ mode reads from end of file in Python 3.4 type: behavior versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22651> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com