[Python-bugs-list] [ python-Bugs-448918 ] docs for mmap module unclear/typo

noreply@sourceforge.net noreply@sourceforge.net
Tue, 25 Sep 2001 12:00:44 -0700


Bugs item #448918, was opened at 2001-08-07 14:14
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=448918&group_id=5470

Category: Documentation
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: docs for mmap module unclear/typo

Initial Comment:
For the mmap module docs:

Under both the Windows and Unix constructors is the
sentence:

"If you wish to map an existing Python file object, use
its fileno() method to obtain the correct value for the
fileno parameter"

OK, but what id I want to map an unopened file???? The
working implies that I don't have to use an existing
file object, but doesn't say how to do otherwise.

under the Windows constructor:
"""

mmap(fileno, length[, tagname]) (Windows version) Maps
length bytes from the file specified by the file handle
fileno, and returns a mmap object. If length is 0, the
maximum length of the map will be the current size of
the file when mmap() is called.
"""

This is pretty clear, but under the Unix section:

"""
mmap(fileno, size[, flags, prot]) (Unix version) Maps
length bytes from the file specified by the file handle
fileno, and returns a mmap object.
"""

In the prototype, there is a required parameter called
"size" and in the next sentence, the variable "length"
is used. Are these supposed to be the same? can I use a
0 to indicate the whole file, as I can on Windows?


Note that none of this seems to have changed in the
development version of the docs.

-Chris

----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-09-25 12:00

Message:
Logged In: YES 
user_id=3066

Fixed in Doc/lib/libmmap.tex revision 1.5.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=448918&group_id=5470