Message209053
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`. |
|
| Date |
User |
Action |
Args |
| 2014-01-24 09:19:52 | cool-RR | set | recipients:
+ cool-RR, pitrou, serhiy.storchaka, cjwelborn |
| 2014-01-24 09:19:52 | cool-RR | set | messageid: <[email protected]> |
| 2014-01-24 09:19:52 | cool-RR | link | issue20218 messages |
| 2014-01-24 09:19:51 | cool-RR | create | |
|