[issue22576] ftplib documentation gives a wrong argument name for storbinary
New submission from Derek Kurth: The Python 3 documentation for ftplib gives the storbinary method signature as: FTP.storbinary(cmd, file, blocksize=8192, callback=None, rest=None) However, the parameter named "file" is actually named "fp" in the code, so if you do something like this: ftp.storbinary(cmd="RETR something.txt", file=f) then you will get a TypeError: storbinary() got an unexpected keyword argument 'file'. I think the documentation should be updated to call that argument "fp" instead of "file." ---------- assignee: docs@python components: Documentation messages: 228773 nosy: Derek.Kurth, docs@python priority: normal severity: normal status: open title: ftplib documentation gives a wrong argument name for storbinary versions: Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue22576> _______________________________________
Roundup Robot added the comment: New changeset 4cc584d47c7d by Berker Peksag in branch '3.4': Issue #22576: Fix signatures of FTP.storbinary() and FTP.storlines() methods. https://hg.python.org/cpython/rev/4cc584d47c7d New changeset f21f0de30544 by Berker Peksag in branch 'default': Issue #22576: Fix signatures of FTP.storbinary() and FTP.storlines() methods. https://hg.python.org/cpython/rev/f21f0de30544 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue22576> _______________________________________
Berker Peksag added the comment: Fixed. Thanks for the report, Derek. ---------- assignee: docs@python -> berker.peksag nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue22576> _______________________________________
Changes by Xiang Zhang <angwerzx@126.com>: ---------- pull_requests: +539 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue22576> _______________________________________
Changes by Xiang Zhang <angwerzx@126.com>: ---------- versions: +Python 2.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue22576> _______________________________________
participants (4)
-
Berker Peksag
-
Derek Kurth
-
Roundup Robot
-
Xiang Zhang