summaryrefslogtreecommitdiffstats
path: root/Doc/library/nntplib.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-11-04 21:36:15 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-11-04 21:36:15 (GMT)
commit08eeadac277982f3e4a501a976e035be6c0ef83c (patch)
tree073b31da7f9e4028e6d1f9f6a277bc543a98f26c /Doc/library/nntplib.rst
parent99c4830d0cbd7ef876f178d4988da86956c39849 (diff)
downloadcpython-08eeadac277982f3e4a501a976e035be6c0ef83c.zip
cpython-08eeadac277982f3e4a501a976e035be6c0ef83c.tar.gz
cpython-08eeadac277982f3e4a501a976e035be6c0ef83c.tar.bz2
Issue #10283: Add a `group_pattern` argument to NNTP.list().
Diffstat (limited to 'Doc/library/nntplib.rst')
-rw-r--r--Doc/library/nntplib.rst22
1 files changed, 14 insertions, 8 deletions
diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst
index 77845c8..3f3995f 100644
--- a/Doc/library/nntplib.rst
+++ b/Doc/library/nntplib.rst
@@ -182,13 +182,15 @@ response indicates an error, the method raises one of the above exceptions.
This command is frequently disabled by NNTP server administrators.
-.. method:: NNTP.list(*, file=None)
+.. method:: NNTP.list(group_pattern=None, *, file=None)
- Send a ``LIST`` command. Return a pair ``(response, list)`` where *list* is a
- list of tuples representing all the groups available from this NNTP server.
- Each tuple has the form ``(group, last, first, flag)``, where
- *group* is a group name, *last* and *first* are the last and first article
- numbers, and *flag* usually takes one of these values:
+ Send a ``LIST`` or ``LIST ACTIVE`` command. Return a pair
+ ``(response, list)`` where *list* is a list of tuples representing all
+ the groups available from this NNTP server, optionally matching the
+ pattern string *group_pattern*. Each tuple has the form
+ ``(group, last, first, flag)``, where *group* is a group name, *last*
+ and *first* are the last and first article numbers, and *flag* usually
+ takes one of these values:
* ``y``: Local postings and articles from peers are allowed.
* ``m``: The group is moderated and all postings must be approved.
@@ -200,8 +202,12 @@ response indicates an error, the method raises one of the above exceptions.
If *flag* has another value, then the status of the newsgroup should be
considered unknown.
- This command will often return very large results. It is best to cache the
- results offline unless you really need to refresh them.
+ This command can return very large results, especially if *group_pattern*
+ is not specified. It is best to cache the results offline unless you
+ really need to refresh them.
+
+ .. versionchanged:: 3.2
+ *group_pattern* was added.
.. method:: NNTP.descriptions(grouppattern)