summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-09-02 14:42:02 (GMT)
committerGuido van Rossum <guido@python.org>1998-09-02 14:42:02 (GMT)
commitf6ae743cb53a2953c7fb063963ec48029206c8b0 (patch)
treec33cba4bdfe565d0f0db4dc91a50aac4e42e48fd /Lib
parentc86b7c63e0f069be8a6bc2d2723e93f6529fd9bb (diff)
downloadcpython-f6ae743cb53a2953c7fb063963ec48029206c8b0.zip
cpython-f6ae743cb53a2953c7fb063963ec48029206c8b0.tar.gz
cpython-f6ae743cb53a2953c7fb063963ec48029206c8b0.tar.bz2
Fix suggested by movits@lockstar.com (plus doc string by myself)
for LIST command with msg argument.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/poplib.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/poplib.py b/Lib/poplib.py
index 2539892..0f588c1 100644
--- a/Lib/poplib.py
+++ b/Lib/poplib.py
@@ -196,14 +196,17 @@ class POP3:
return (numMessages, sizeMessages)
- def list(self, which=None):
+ def list(self, msg=None):
"""Request listing, return result.
- Result is in form ['response', ['mesg_num octets', ...]].
- Unsure what the optional 'msg' arg does.
+ Result without a msg argument is in form
+ ['response', ['mesg_num octets', ...]].
+
+ Result when a msg argument is given is a single response:
+ the "scan listing" for that message.
"""
if which:
- return self._longcmd('LIST %s' % which)
+ return self._shortcmd('LIST %s' % which)
return self._longcmd('LIST')