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 pakal
Recipients georg.brandl, pakal
Date 2009-09-30.06:52:39
SpamBayes Score 5.3575544e-08
Marked as misclassified No
Message-id <1254293562.36.0.276551925074.issue7022@psf.upfronthosting.co.za>
In-reply-to
Content
*Propositions of doc update*

*RawIOBase*.read(n: int) -> bytes

Read up to n bytes from the object and return them. Fewer than n bytes
may be returned if the operating system call returns fewer than n bytes.
If 0 bytes are returned, and n was not 0, this indicates end of file. If
the object is in non-blocking mode and no bytes are available, the call
returns None.


<warning - this proposition requires patching teh current implementation
as well>:
*RawIOBase*.readinto(b: bytearray, [start: int = None], [end: int =
None]) -> int

start and end are used as slice indexes, so that the bytearray taken
into account is actually range = b[start:end] (or b[start:], b[:end] or
b[:], depending on the arguments which are not None).

Read up to len(range) bytes from the object and store them in b, returning
the number of bytes read. Like .read, fewer than len(range) bytes may be
read, and 0 indicates end of file if len(range) is not 0.
None is returned if a non-blocking object has no bytes available. The
length of b is never changed.
History
Date User Action Args
2009-09-30 06:52:42pakalsetrecipients: + pakal, georg.brandl
2009-09-30 06:52:42pakalsetmessageid: <1254293562.36.0.276551925074.issue7022@psf.upfronthosting.co.za>
2009-09-30 06:52:40pakallinkissue7022 messages
2009-09-30 06:52:39pakalcreate