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 pitrou
Recipients BreamoreBoy, bbrazil, brian.curtin, eric.araujo, jemfinch, jlgijsbers, loewis, pitrou, tarek, tim.golden
Date 2010-09-13.14:01:38
SpamBayes Score 2.0428104e-14
Marked as misclassified No
Message-id <1284386500.49.0.15949359924.issue1076515@psf.upfronthosting.co.za>
In-reply-to
Content
I agree that this follows Unix behaviour: a read-only file is a file whose contents cannot be modified, but you can replace it with another totally different file. You can also delete it, by the way (*).

Also, even if this weren't the desired behaviour, changing it would break compatibility for existing scripts.

(*)

>>> open('b', 'w').write('b')
1
>>> os.chmod('b', 000)
>>> os.remove('b')
>>> open('b', 'r')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'b'
History
Date User Action Args
2010-09-13 14:01:40pitrousetrecipients: + pitrou, loewis, jlgijsbers, jemfinch, tim.golden, tarek, eric.araujo, brian.curtin, BreamoreBoy, bbrazil
2010-09-13 14:01:40pitrousetmessageid: <1284386500.49.0.15949359924.issue1076515@psf.upfronthosting.co.za>
2010-09-13 14:01:38pitroulinkissue1076515 messages
2010-09-13 14:01:38pitroucreate