Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2fdafe

Browse files
committed
Issue #22576: Fix signatures of FTP.storbinary() and FTP.storlines() methods.
The correct parameter name is "fp", not "file".
1 parent 2ce95d7 commit b2fdafe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/ftplib.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,10 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
262262
Passive mode is on by default.
263263

264264

265-
.. method:: FTP.storbinary(cmd, file, blocksize=8192, callback=None, rest=None)
265+
.. method:: FTP.storbinary(cmd, fp, blocksize=8192, callback=None, rest=None)
266266

267267
Store a file in binary transfer mode. *cmd* should be an appropriate
268-
``STOR`` command: ``"STOR filename"``. *file* is a :term:`file object`
268+
``STOR`` command: ``"STOR filename"``. *fp* is a :term:`file object`
269269
(opened in binary mode) which is read until EOF using its :meth:`~io.IOBase.read`
270270
method in blocks of size *blocksize* to provide the data to be stored.
271271
The *blocksize* argument defaults to 8192. *callback* is an optional single
@@ -276,11 +276,11 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
276276
*rest* parameter added.
277277

278278

279-
.. method:: FTP.storlines(cmd, file, callback=None)
279+
.. method:: FTP.storlines(cmd, fp, callback=None)
280280

281281
Store a file in ASCII transfer mode. *cmd* should be an appropriate
282282
``STOR`` command (see :meth:`storbinary`). Lines are read until EOF from the
283-
:term:`file object` *file* (opened in binary mode) using its :meth:`~io.IOBase.readline`
283+
:term:`file object` *fp* (opened in binary mode) using its :meth:`~io.IOBase.readline`
284284
method to provide the data to be stored. *callback* is an optional single
285285
parameter callable that is called on each line after it is sent.
286286

0 commit comments

Comments
 (0)