Message from discussion
mode for file created by open
Received: by 10.68.191.225 with SMTP id hb1mr2720767pbc.5.1339688349323;
Thu, 14 Jun 2012 08:39:09 -0700 (PDT)
Path: l9ni50259pbj.0!nntp.google.com!news1.google.com!news4.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.138.MISMATCH!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path: <came...@cskk.homeip.net>
X-Original-To: python-l...@python.org
Delivered-To: python-l...@mail.python.org
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; "wouldn't": 0.03;
'arguments': 0.09; 'subject:file': 0.09; 'terry': 0.09;
'windows,': 0.09; 'cc:addr:python-list': 0.10; 'ignore': 0.15;
'"default': 0.16; '-1000': 0.16; 'argument.': 0.16; 'dod#743':
0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16;
'from:name:cameron simpson': 0.16; 'mapped': 0.16; 'message-
id:@cskk.homeip.net': 0.16; 'received:202.125.174': 0.16;
'received:202.125.174.133': 0.16;
'received:boardofstudies.nsw.edu.au': 0.16;
'received:cskk.homeip.net': 0.16; 'received:edu.au': 0.16;
'received:harvey.boardofstudies.nsw.edu.au': 0.16;
'received:homeip.net': 0.16; 'received:nsw.edu.au': 0.16; 'reedy':
0.16; 'simpson': 0.16; 'url:cskk': 0.16; 'url:ezoshosting': 0.16;
'valueerror': 0.16; 'wrote:': 0.17; 'value.': 0.18; 'permission':
0.23; 'header:In-Reply-To:1': 0.23; 'header:User-Agent:1': 0.26;
'cc:2**0': 0.27; 'raise': 0.27; 'ignored.': 0.27; 'cc:no real
name:2**0': 0.28; 'cc:addr:python.org': 0.29; 'probably': 0.30;
'guess': 0.30; "i'm": 0.30; 'system,': 0.31; 'file': 0.34;
'implement': 0.35; 'add': 0.35; 'mode': 0.35; 'not.': 0.35;
'charset:us-ascii': 0.36; 'really': 0.36; 'received:au': 0.36;
'does': 0.36; 'but': 0.36; 'whatever': 0.37; 'subject:: ': 0.37;
'why': 0.39; 'content-disposition:inline': 0.61; 'calls': 0.62;
'cameron': 0.66; 'bitmap': 0.84; 'subject:mode': 0.84
Date: Sun, 10 Jun 2012 09:19:27 +1000
From: Cameron Simpson <c...@zip.com.au>
To: Terry Reedy <tjre...@udel.edu>
Subject: Re: mode for file created by open
MIME-Version: 1.0
In-Reply-To: <jr0ko3$2p...@dough.gmane.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
References: <jr0ko3$2p...@dough.gmane.org>
Cc: python-l...@python.org
X-BeenThere: python-l...@python.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <http://mail.python.org/mailman/options/python-list>,
<mailto:python-list-requ...@python.org?subject=unsubscribe>
List-Archive: <http://mail.python.org/pipermail/python-list>
List-Post: <mailto:python-l...@python.org>
List-Help: <mailto:python-list-requ...@python.org?subject=help>
List-Subscribe: <http://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-requ...@python.org?subject=subscribe>
Newsgroups: comp.lang.python
Message-ID: <mailman.1053.1339524392.4697.python-l...@python.org>
Lines: 20
NNTP-Posting-Host: 2001:888:2000:d::a6
X-Trace: 1339524392 news.xs4all.nl 6901 [2001:888:2000:d::a6]:34587
X-Complaints-To: ab...@xs4all.nl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On 09Jun2012 19:03, Terry Reedy <tjre...@udel.edu> wrote:
| > So I would guess it wouldn't be difficult to add the creation mode argument.
|
| On posix system, probably not. On windows, just ignore it, unless 'root'
| can be mapped to 'admin'.
Oh please NO!
Either implement it correctly, or raise a ValueError if it is supplied
and not whatever means "default open".
A huge -1000 for arguments that have meaning but are ignored.
This is why I'm -1 to start with: a file permission bitmap is a
posix.open() value. It does not map portably to the general open().
--
Cameron Simpson <c...@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
This calls for a really stupid and futile gesture. - Strayhorn