Author: Carl Friedrich Bolz <[email protected]>
Branch:
Changeset: r88065:35d29fcad35b
Date: 2016-11-02 13:40 +0100
http://bitbucket.org/pypy/pypy/changeset/35d29fcad35b/
Log: add two missing docstrings
(they were missing in CPython 2 as well, but CPython 3 added them).
diff --git a/pypy/module/_socket/interp_socket.py
b/pypy/module/_socket/interp_socket.py
--- a/pypy/module/_socket/interp_socket.py
+++ b/pypy/module/_socket/interp_socket.py
@@ -479,6 +479,14 @@
@unwrap_spec(nbytes=int, flags=int)
def recv_into_w(self, space, w_buffer, nbytes=0, flags=0):
+ """recv_into(buffer, [nbytes[, flags]]) -> nbytes_read
+
+ A version of recv() that stores its data into a buffer rather than
creating
+ a new string. Receive up to buffersize bytes from the socket. If
buffersize
+ is not specified (or 0), receive up to the size available in the given
buffer.
+
+ See recv() for documentation about the flags.
+ """
rwbuffer = space.getarg_w('w*', w_buffer)
lgt = rwbuffer.getlength()
if nbytes == 0 or nbytes > lgt:
@@ -490,6 +498,10 @@
@unwrap_spec(nbytes=int, flags=int)
def recvfrom_into_w(self, space, w_buffer, nbytes=0, flags=0):
+ """recvfrom_into(buffer[, nbytes[, flags]]) -> (nbytes, address info)
+
+ Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's
address info.
+ """
rwbuffer = space.getarg_w('w*', w_buffer)
lgt = rwbuffer.getlength()
if nbytes == 0:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit