From 2c11e23a5a686edc69bcbb4c65f500d50d992bb3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9s=20Delfino?= Date: Sat, 23 Jun 2018 23:16:29 -0300 Subject: [PATCH] [2.7] bpo-33885: Replace "hook function" with "callable" (GH-7765). (#7885) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit (cherry picked from commit c45cb479074b5d25f0d382d3109f527520a9f03c) Co-authored-by: Andrés Delfino --- Doc/library/urllib.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst index 2a5ea717f061..c24f4375e9d8 100644 --- a/Doc/library/urllib.rst +++ b/Doc/library/urllib.rst @@ -166,9 +166,9 @@ High-level interface The second argument, if present, specifies the file location to copy to (if absent, the location will be a tempfile with a generated name). The third - argument, if present, is a hook function that will be called once on + argument, if present, is a callable that will be called once on establishment of the network connection and once after each block read - thereafter. The hook will be passed three arguments; a count of blocks + thereafter. The callable will be passed three arguments; a count of blocks transferred so far, a block size in bytes, and the total size of the file. The third argument may be ``-1`` on older FTP servers which do not return a file size in response to a retrieval request. -- 2.47.3