How does python deal with the circumstance when mode "a" and "w" appear at the same time, i.e.
f = open(filename, "wa")
or
f = open(filename, "aw")
I noticed there was a similar question here, python open built-in function: difference between modes a, a+, w, w+, and r+?, but it doesn't explain my question. I also tried to read the source code in C here https://hg.python.org/cpython/file/2.7/Objects/fileobject.c, but my question was not explained, either.
I have tried the above codes, and it seems that Python would take only the first parameter when both "a" and "w" are given. This makes no sense, why Python doesn't raise an error instead?