Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
23244e57
Commit
23244e57
authored
Nov 21, 2015
by
Martin Panter
Browse files
Options
Browse Files
Download
Plain Diff
Issue #25689: Merge ftplib and nntplib docs from 3.4 into 3.5
parents
4a93cf79
828123ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
Doc/library/ftplib.rst
Doc/library/ftplib.rst
+1
-2
Doc/library/nntplib.rst
Doc/library/nntplib.rst
+2
-2
No files found.
Doc/library/ftplib.rst
View file @
23244e57
...
...
@@ -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:
...
...
Doc/library/nntplib.rst
View file @
23244e57
...
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment