Antoine Pitrou <pit...@free.fr> added the comment:

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'

----------
nosy: +pitrou

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1076515>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to