mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
fixed outdated annotation of readinto in io
This commit is contained in:
parent
21c80f2249
commit
ca2b01515b
@ -487,8 +487,8 @@ class RawIOBase(IOBase):
|
||||
res += data
|
||||
return bytes(res)
|
||||
|
||||
def readinto(self, b: bytes) -> int:
|
||||
"""readinto(b: bytes) -> int. Read up to len(b) bytes into b.
|
||||
def readinto(self, b: bytearray) -> int:
|
||||
"""readinto(b: bytearray) -> int. Read up to len(b) bytes into b.
|
||||
|
||||
Returns number of bytes read (0 for EOF), or None if the object
|
||||
is set not to block as has no data to read.
|
||||
@ -563,8 +563,8 @@ class BufferedIOBase(IOBase):
|
||||
"""
|
||||
self._unsupported("read")
|
||||
|
||||
def readinto(self, b: bytes) -> int:
|
||||
"""readinto(b: bytes) -> int. Read up to len(b) bytes into b.
|
||||
def readinto(self, b: bytearray) -> int:
|
||||
"""readinto(b: bytearray) -> int. Read up to len(b) bytes into b.
|
||||
|
||||
Like read(), this may issue multiple reads to the underlying
|
||||
raw stream, unless the latter is 'interactive' (XXX or a
|
||||
|
Loading…
Reference in New Issue
Block a user