Message93352
*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. |
|
Date |
User |
Action |
Args |
2009-09-30 06:52:42 | pakal | set | recipients:
+ pakal, georg.brandl |
2009-09-30 06:52:42 | pakal | set | messageid: <1254293562.36.0.276551925074.issue7022@psf.upfronthosting.co.za> |
2009-09-30 06:52:40 | pakal | link | issue7022 messages |
2009-09-30 06:52:39 | pakal | create | |
|