Julius Lehmann-Richter added the comment: Hey Wolfgang,
thank you for looking into this old one again ;) The argument you are making does not answer the original bug report though as far as I can see. My initial problem was not the AttributeError about the missing write but a ValueError (I/O operation on closed file). Also this seems to have started a discussion about good programming practice between Terry and Antoine, my initial argument though was that, when you are catching an IOError for an invalid file, why not catch the ValueError for the closed file (since a closed file is surely not a valid target for a write operation). I would really like to be educated on this if I am missing something, why does the argument for not silencing errors and expecting good programming practice apply to the ValueError of a closed standard error which has not been set to None but not to an IOError of a passed in file object? Cheers Julius ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22298> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com