bug? mmap doesn't like 0-length files

Neal Becker ndbecker2 at gmail.com
Tue Nov 23 02:33:08 CET 2010

 mmap.mmap (f.fileno(), 0, prot=mmap.PROT_READ)
error: [Errno 22] Invalid argument

According to http://docs.python.org/library/mmap.html, mmap on _windows_ 
doesn't accept 0-length file.  But this was tested on linux.  Is this a bug?  

I don't see anything in linux man-page about the underlying C mmap function 
not accepting 0-length files.

More information about the Python-list mailing list