I have recently been going through some of our windows python 2.4 code and come across this:
self.logfile = open(self.logfile_name, "wua")
I know what w, u and a do on their own, but what happens when you combine them?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
ais superfluous.wuais the same aswusincewcomes first and will thus truncate the file. If you would reverse the order, that is,auw, that would be the same asau. Visualized:(Reminder: both
aandwopen the file for writing, but the former appends while the other truncates.)