to the class namespace.
Allow FTP.close() to be called more than once without tossing cookies.
(This seems to be a fairly common idiom for .close() methods, so let's
try to be consistent.)
This is slightly controversial, but after reading the argumentation in
the bug tracker for and against, I believe this is the right solution.
Let me know if it breaks for you, and how.
#101187, which some modifications. Specifically,
ntransfercmd(), transfercmd(), and retrbinary() all grow an optional
`rest' argument, which if not None, is used as the argument to an FTP
REST comman dbefore the socket is returned. Differences from the SF
patch:
- always compare against None with `is' or `is not' instead of == or !=
- no parens around conditional
- RFC 959 defines the argument to REST is a string containing any
ASCII characters in the range [33..126]. Therefore, we use the %s
format character instead of %f or %d as suggested in the patch's
comments. Note that we do /not/ sanity checkthe contents of the
rest argument (but we'll document this in the library reference
manual).
*this* set of patches is Ka-Ping's final sweep:
The attached patches update the standard library so that all modules
have docstrings beginning with one-line summaries.
A new docstring was added to formatter. The docstring for os.py
was updated to mention nt, os2, ce in addition to posix, dos, mac.
constructors. There is no backward compatibility. Not everything has
been tested.
* aiff.{py,doc}: deleted in favor of aifc.py (which contains its docs as
comments)
variables can still be seen by the debugger
* ftplib.py (retrlines): args should be *args.
* ChangeLog: entries for Sjoerd's addition sunau.py and changes to aiff.py
* test_md5.py: test program for built-in md5 module
reduce)
* ftplib.py: added default callback for retrlines; added dir() method
* ftplib.py: don't return self in self.connect(); added hack so that if
'CDUP' is not understood, 'CWD ..' is tried.
* ftplib.py: second method called init() should have been called
connect(); if __init__ sees more than one argument, it will also try to
login().
negative start indices starting from the right.
* ftplib.py: debug() -> set_debuglevel(); change demo to use __init__().
* os.py: added execl, execlp, and execvp.
* lambda.py: removed (now that we have built-in map, reduce, bagof, lambda)
* test_b{1,2}.py, testall.out: added tests for bagof, lambda, map, reduce
* commands.py: use os, not posix
* test_grammar.py: make it easy to disable non-portable int overflow tests
* dis.py: don't abuse range()
* sndhdr.py: renamed to whatsound.py; use new aifc module for AIFF/AIFC
* ftplib.py: added close() (closes without sending QUIT command)
* aifc.py: documented close()