summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorJeroen Ruigrok van der Werven <asmodai@in-nomine.org>2009-02-19 18:52:21 (GMT)
committerJeroen Ruigrok van der Werven <asmodai@in-nomine.org>2009-02-19 18:52:21 (GMT)
commit5149742e8b3c8221d4cb53dcfc9a12ae3fec9238 (patch)
treed3b7dbc021eeed177f453603f8f59f0ad01b2e0e /Doc/whatsnew
parenta630735b31b5ee0a1a59b3b28299e26a7ee74d9f (diff)
downloadcpython-5149742e8b3c8221d4cb53dcfc9a12ae3fec9238.zip
cpython-5149742e8b3c8221d4cb53dcfc9a12ae3fec9238.tar.gz
cpython-5149742e8b3c8221d4cb53dcfc9a12ae3fec9238.tar.bz2
Since we recommend one module per import line, reflect this also in the
documentation.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/2.6.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index f04f194..17ee766 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -473,7 +473,8 @@ statement both starts a database transaction and acquires a thread lock::
Finally, the :func:`closing(object)` function returns *object* so that it can be
bound to a variable, and calls ``object.close`` at the end of the block. ::
- import urllib, sys
+ import sys
+ import urllib
from contextlib import closing
with closing(urllib.urlopen('http://www.yahoo.com')) as f: