diff options
| author | Martin Panter <vadmium+py@gmail.com> | 2015-11-21 22:49:06 (GMT) |
|---|---|---|
| committer | Martin Panter <vadmium+py@gmail.com> | 2015-11-21 22:49:06 (GMT) |
| commit | d6a59bacd8b6254d430cff661dab8bdbb68d7639 (patch) | |
| tree | d99af4701913f67d302ee4c5952a2e2d44aeca48 | |
| parent | d40d90ab8f2b79e241cfc7488add6c742860126e (diff) | |
| parent | 23244e5787209254143753f8bbaecde7d29ea9da (diff) | |
| download | cpython-d6a59bacd8b6254d430cff661dab8bdbb68d7639.zip cpython-d6a59bacd8b6254d430cff661dab8bdbb68d7639.tar.gz cpython-d6a59bacd8b6254d430cff661dab8bdbb68d7639.tar.bz2 | |
Issue #25689: Merge ftplib and nntplib docs from 3.5
| -rw-r--r-- | Doc/library/ftplib.rst | 3 | ||||
| -rw-r--r-- | Doc/library/nntplib.rst | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst index 3d1f783..f06e678 100644 --- a/Doc/library/ftplib.rst +++ b/Doc/library/ftplib.rst @@ -52,8 +52,7 @@ The module defines the following items: will be used). *source_address* is a 2-tuple ``(host, port)`` for the socket to bind to as its source address before connecting. - :class:`FTP` class supports the :keyword:`with` statement. Here is a sample - on how using it: + The :class:`FTP` class supports the :keyword:`with` statement, e.g.: >>> from ftplib import FTP >>> with FTP("ftp1.at.proftpd.org") as ftp: diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst index 4797965..9fb1b45 100644 --- a/Doc/library/nntplib.rst +++ b/Doc/library/nntplib.rst @@ -69,9 +69,9 @@ The module itself defines the following classes: connecting to an NNTP server on the local machine and intend to call reader-specific commands, such as ``group``. If you get unexpected :exc:`NNTPPermanentError`\ s, you might need to set *readermode*. - :class:`NNTP` class supports the :keyword:`with` statement to + The :class:`NNTP` class supports the :keyword:`with` statement to unconditionally consume :exc:`OSError` exceptions and to close the NNTP - connection when done. Here is a sample on how using it: + connection when done, e.g.: >>> from nntplib import NNTP >>> with NNTP('news.gmane.org') as n: |
