Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45068 > unrolled thread

Re: object.enable() anti-pattern

Started byCameron Simpson <cs@zip.com.au>
First post2013-05-10 09:29 +1000
Last post2013-05-10 09:29 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: object.enable() anti-pattern Cameron Simpson <cs@zip.com.au> - 2013-05-10 09:29 +1000

#45068 — Re: object.enable() anti-pattern

FromCameron Simpson <cs@zip.com.au>
Date2013-05-10 09:29 +1000
SubjectRe: object.enable() anti-pattern
Message-ID<mailman.1513.1368144164.3114.python-list@python.org>
On 10May2013 10:56, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
| 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.

Interesting. That is more direct. My understanding that it was
enough to create the file with 0 modes. Maybe either will do. Must
check...

Cheers,
-- 
Cameron Simpson <cs@zip.com.au>

Piracy gets easier every day, but listening to legally purchased music gets harder by the day.
Firehed - http://politics.slashdot.org/comments.pl?sid=179175&cid=14846089

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web