Author dholth
Recipients dholth
Date 2020-04-09.03:47:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The io documentation says:

IOBase is also a context manager and therefore supports the with statement. In this example, file is closed after the with statement’s suite is finished—even if an exception occurs:

with open('spam.txt', 'w') as file:
    file.write('Spam and eggs!')

I read this to mean that my own subclass of io.BufferedIOBase would call close() when used as a context manager.

Instead, it is necessary to provide an implementation of __exit__ that calls close() to get this behavior.

The documentation lists Mixin Methods, but I couldn't find a definition of the term "Mixin Methods" in the docs.
Date User Action Args
2020-04-09 03:47:22dholthsetrecipients: + dholth
2020-04-09 03:47:22dholthsetmessageid: <>
2020-04-09 03:47:21dholthlinkissue40235 messages
2020-04-09 03:47:21dholthcreate