Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca904be

Browse files
committed
Nits.
1 parent 1e6a173 commit ca904be

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

Doc/whatsnew/3.2.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ focuses on a few highlights and gives a few examples. For full details, see the
5555

5656
:pep:`392` - Python 3.2 Release Schedule
5757

58+
5859
PEP 384: Defining a Stable ABI
5960
==============================
6061

@@ -78,6 +79,7 @@ need to be recompiled for every feature release.
7879
:pep:`384` - Defining a Stable ABI
7980
PEP written by Martin von Löwis.
8081

82+
8183
PEP 389: Argparse Command Line Parsing Module
8284
=============================================
8385

@@ -208,17 +210,19 @@ dictionary::
208210
If that dictionary is stored in a file called :file:`conf.json`, it can be
209211
loaded and called with code like this::
210212

211-
import json
212-
import logging.config
213-
logging.config.dictConfig(json.load(open('conf.json', 'rb')))
214-
logging.info("Transaction completed normally")
215-
logging.critical("Abnormal termination")
213+
>>> import json, logging.config
214+
>>> with open('conf.json', 'rb') as f:
215+
conf = json.load(f)
216+
>>> logging.config.dictConfig(conf)
217+
>>> logging.info("Transaction completed normally")
218+
>>> logging.critical("Abnormal termination")
216219

217220
.. seealso::
218221

219222
:pep:`391` - Dictionary Based Configuration for Logging
220223
PEP written by Vinay Sajip.
221224

225+
222226
PEP 3148: The ``concurrent.futures`` module
223227
============================================
224228

@@ -277,7 +281,6 @@ launch of four parallel threads for copying files::
277281
:class:`~concurrent.futures.ProcessPoolExecutor`.
278282

279283

280-
281284
PEP 3147: PYC Repository Directories
282285
=====================================
283286

@@ -369,6 +372,7 @@ module::
369372
:pep:`3149` - ABI Version Tagged .so Files
370373
PEP written by Barry Warsaw.
371374

375+
372376
PEP 3333: Python Web Server Gateway Interface v1.0.1
373377
=====================================================
374378

@@ -415,6 +419,7 @@ this gap, the :mod:`wsgiref` module has a new function,
415419
:pep:`3333` - Python Web Server Gateway Interface v1.0.1
416420
PEP written by Phillip Eby.
417421

422+
418423
Other Language Changes
419424
======================
420425

@@ -891,9 +896,8 @@ datetime and time
891896
:class:`float` and divided by :class:`float` and :class:`int` objects.
892897
And :class:`~datetime.timedelta` objects can now divide one another.
893898

894-
* The :class:`~datetime.datetime` class and the :meth:`datetime.date.strftime`
895-
method are no longer restricted to years after 1900. The new supported year
896-
range is from 1000 to 9999 inclusive.
899+
* The :meth:`datetime.date.strftime` method is no longer restricted to years
900+
after 1900. The new supported year range is from 1000 to 9999 inclusive.
897901

898902
* The rules for two-digit years in time tuples have changed. Now, the
899903
:func:`time.asctime` and :func:`time.strftime` functions will format any year

0 commit comments

Comments
 (0)