Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
interaction of mode 'r+', file.write(), and file.tell(): a bug orundefined behavior?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Alf P. Steinbach, post: 4017425"] * Anthony Tolle: As far as I understand it the behavior stems from CPython file operations being implemented fairly directly as forwarding to C library FILE* operations, and the C standard prescribes Undefined Behavior to the case above. I think the Python language/library specification should specify the effect (perhaps just as UB, but anyway, specified). For as it is, it may/will be different with different Python implementations, meaning that code that works OK with one implementation may fail with another implementation. Cheers, - Alf [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
interaction of mode 'r+', file.write(), and file.tell(): a bug orundefined behavior?
Top