object.enable() anti-pattern
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu May 9 18:56:45 EDT 2013
Cameron Simpson wrote:
> You open a file with "0" modes, so
> that it is _immediately_ not writable. Other attempts to make the
> lock file thus fail because of the lack of write,
I don't think that's quite right. You open it with
O_CREAT+O_EXCL, which atomically fails if the file
already exists. The read/write modes don't really
come into it, as far as I know.
--
Greg
More information about the Python-list
mailing list