MMap "access" keyword, choice of exception class

Jay Todd Miller jmiller at stsci.edu
Sat Nov 3 11:02:38 EST 2001


Hi,

I have written (and submitted) a patch which adds a  new keyword
parameter to mmap: "access".  One dubious kind
of access which I added for the sake of completeness is "readonly".  A
readonly mmap maps true
OS protected readonly memory and does not update the underlying file.
When python detects and attempt
to write a readonly mmap, an exception is raised;  Is there an obvious
choice for what the exception class should be?

I need to re-submit the patch for a few stylistic issues anyway, and
would like to fix this while I'm at it.  Right now, the
patch raises ValueError.  SystemError and RuntimeError also come to
mind.

Thanks,
Todd





More information about the Python-list mailing list