This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cool-RR
Recipients cjwelborn, cool-RR, pitrou, serhiy.storchaka
Date 2014-01-24.09:19:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390555192.24.0.30055904708.issue20218@psf.upfronthosting.co.za>
In-reply-to
Content
I like the patch. Except I'd like to have support for the 'x' flag in the `write_text` and `write_bytes` methods. I suggest an argument `exclusive`, which defaults to `False`. When `exclusive=True`, the mode will be 'x' or 'xb'.

The first lines after each method definition should be:

    if append and exclusive:
        raise Exception("Can't use both `append` and `exclusive` modes together; `append` implies that the file exists, while `exclusive` implies it does not.")

If you don't like long exception texts, you can shorten it to just the first sentence. Also, you may want to choose a different exception class than `Exception`.
History
Date User Action Args
2014-01-24 09:19:52cool-RRsetrecipients: + cool-RR, pitrou, serhiy.storchaka, cjwelborn
2014-01-24 09:19:52cool-RRsetmessageid: <1390555192.24.0.30055904708.issue20218@psf.upfronthosting.co.za>
2014-01-24 09:19:52cool-RRlinkissue20218 messages
2014-01-24 09:19:51cool-RRcreate