What is the difference between rw+ and r+
On Linux at least, there’s no difference as far as I can tell. Here’s a test script and its corresponding OS syscalls (using strace); tested on python 2.7.9. See http://man7.org/linux/man-pages/man2/open.2.html for more details on the file access and creation flags. It’s not accurate to say a file object opened with ‘r+’ cannot be used to truncate a file – … Read more