def _iswritemode(self, mode):
<EOL>_writemodes = ("<STR_LIT:w>", "<STR_LIT:+>")<EOL>for c in mode:<EOL><INDENT>if c in _writemodes:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Test if the given mode will open a file for writing.