@@ -205,8 +205,8 @@ dictionary::
205205 "root": {"level": "DEBUG", "handlers": ["console", "console_priority"]}}
206206
207207
208- If that dictionary is stored in a file called :file: `conf.json `, it can loaded
209- and called with code like this::
208+ If that dictionary is stored in a file called :file: `conf.json `, it can be
209+ loaded and called with code like this::
210210
211211 >>> import logging.config
212212 >>> logging.config.dictConfig(json.load(open('conf.json', 'rb')))
@@ -281,7 +281,7 @@ PEP 3147: PYC Repository Directories
281281=====================================
282282
283283Python's scheme for caching bytecode in *.pyc * files did not work well in
284- environments with multiple python interpreters. If one interpreter encountered
284+ environments with multiple Python interpreters. If one interpreter encountered
285285a cached file created by another interpreter, it would recompile the source and
286286overwrite the cached file, thus losing the benefits of caching.
287287
@@ -367,7 +367,7 @@ PEP 3333: Python Web Server Gateway Interface v1.0.1
367367
368368This informational PEP clarifies how bytes/text issues are to be handled by the
369369WGSI protocol. The challenge is that string handling in Python 3 is most
370- conveniently handled with the :class: `str ` type eventhough the HTTP protocol
370+ conveniently handled with the :class: `str ` type even though the HTTP protocol
371371is itself bytes oriented.
372372
373373The PEP differentiates so-called *native strings * that are used for
@@ -428,8 +428,8 @@ Some smaller changes made to the core Python language are:
428428 (Suggested by Mark Dickinson and implemented by Eric Smith in :issue: `7094 `.)
429429
430430* The interpreter can now be started with a quiet option, ``-q ``, to suppress
431- the copyright and version information in an interactive mode. The option can
432- be introspected using the :attr: `sys.flags ` attribute::
431+ the copyright and version information from being displayed in the interactive
432+ mode. The option can be introspected using the :attr: `sys.flags ` attribute::
433433
434434 $ python -q
435435 >>> sys.flags
@@ -500,7 +500,7 @@ Some smaller changes made to the core Python language are:
500500* The internal :c:type: `structsequence ` tool now creates subclasses of tuple.
501501 This means that C generated structures like those returned by :func: `os.stat `,
502502 :func: `time.gmtime `, and :func: `sys.version_info ` now work like a
503- :term: `named tuple ` and are more interoperable with functions and methods that
503+ :term: `named tuple ` and now work with functions and methods that
504504 expect a tuple as an argument. The is a big step forward in making the C
505505 structures as flexible as their pure Python counterparts.
506506
@@ -530,7 +530,7 @@ Some smaller changes made to the core Python language are:
530530 produce various issues, especially under Windows. Here is an example
531531 of enabling the warning from the command line::
532532
533- $ ./ python -q -Wdefault
533+ $ python -q -Wdefault
534534 >>> f = open("foo", "wb")
535535 >>> del f
536536 __main__:1: ResourceWarning: unclosed file <_io.BufferedWriter name='foo'>
@@ -553,7 +553,7 @@ Some smaller changes made to the core Python language are:
553553 >>> range(0, 100, 2)[0:5]
554554 range(0, 10, 2)
555555
556- (Contributed by Daniel Stuzback in :issue: `9213 ` and by Alexander Belopolsky
556+ (Contributed by Daniel Stutzback in :issue: `9213 ` and by Alexander Belopolsky
557557 in :issue: `2690 `.)
558558
559559* The :func: `callable ` builtin function from Py2.x was resurrected. It provides
@@ -586,7 +586,7 @@ For the first time, there is correct handling of inputs with mixed encodings.
586586Throughout the standard library, there has been more careful attention to
587587encodings and text versus bytes issues. In particular, interactions with the
588588operating system are now better able to pass non-ASCII data using the Windows
589- mcbs encoding, locale aware encodings, or UTF-8.
589+ mcbs encoding, locale- aware encodings, or UTF-8.
590590
591591Another significant win is the addition of substantially better support for
592592*SSL * connections and security certificates.
@@ -655,7 +655,7 @@ Several new and useful functions and methods have been added:
655655* :meth: `xml.etree.ElementTree.Element.iterfind ` searches an element and
656656 subelements
657657* :meth: `xml.etree.ElementTree.Element.itertext ` creates a text iterator over
658- an element and its sub-elements
658+ an element and its subelements
659659* :meth: `xml.etree.ElementTree.TreeBuilder.end ` closes the current element
660660* :meth: `xml.etree.ElementTree.TreeBuilder.doctype ` handles a doctype
661661 declaration
@@ -714,7 +714,7 @@ functools
714714
715715* To help write classes with rich comparison methods, a new decorator
716716 :func: `functools.total_ordering ` will use a existing equality and inequality
717- methods to fill- in the remaining methods.
717+ methods to fill in the remaining methods.
718718
719719 For example, supplying *__eq__ * and *__lt__ * will enable
720720 :func: `~functools.total_ordering ` to fill-in *__le__ *, *__gt__ * and *__ge__ *::
@@ -729,7 +729,7 @@ functools
729729 (other.lastname.lower(), other.firstname.lower()))
730730
731731 With the *total_ordering * decorator, the remaining comparison methods
732- are filled- in automatically.
732+ are filled in automatically.
733733
734734 (Contributed by Raymond Hettinger.)
735735
@@ -823,7 +823,7 @@ datetime
823823
824824* The :mod: `datetime ` module has a new type :class: `~datetime.timezone ` that
825825 implements the :class: `~datetime.tzinfo ` interface by returning a fixed UTC
826- offset and timezone name. This makes it easier to create timezone aware
826+ offset and timezone name. This makes it easier to create timezone- aware
827827 datetime objects:
828828
829829 >>> datetime.now(timezone.utc)
@@ -856,7 +856,7 @@ contextlib
856856
857857There is a new and slightly mind-blowing tool
858858:class: `~contextlib.ContextDecorator ` that is helpful for creating a
859- :term: `context manager ` that does double- duty as a function decorator.
859+ :term: `context manager ` that does double duty as a function decorator.
860860
861861As a convenience, this new functionality is used by
862862:func: `~contextlib.contextmanager ` so that no extra effort is needed to support
@@ -866,7 +866,7 @@ The basic idea is that both context managers and function decorators can be used
866866for pre-action and post-action wrappers. Context managers wrap a group of
867867statements using the :keyword: `with `-statement, and function decorators wrap a
868868group of statements enclosed in a function. So, occasionally there is a need to
869- write a pre/post action wrapper that can be used in either role.
869+ write a pre-action or post- action wrapper that can be used in either role.
870870
871871For example, it is sometimes useful to wrap functions or groups of statements
872872with a logger that can track the time of entry and time of exit. Rather than
@@ -906,7 +906,7 @@ statements.
906906(Contributed by Michael Foord in :issue: `9110 `.)
907907
908908decimal and fractions
909- ----------------------
909+ ---------------------
910910
911911Mark Dickinson crafted an elegant and efficient scheme for assuring that
912912different numeric datatypes will have the same hash value whenever their actual
@@ -1107,7 +1107,7 @@ nntp
11071107----
11081108
11091109The :mod: `nntplib ` module has a revamped implementation with better bytes and
1110- unicode semantics as well as more practical APIs. These improvements break
1110+ text semantics as well as more practical APIs. These improvements break
11111111compatibility with the nntplib version in Python 3.1, which was partly
11121112dysfunctional in itself.
11131113
@@ -1131,14 +1131,14 @@ packages, easier experimentation at the interactive prompt, new testcase
11311131methods, improved diagnostic messages for test failures, and better method
11321132names.
11331133
1134- * The command-line call, ``python -m unittest `` can now accept file paths
1134+ * The command-line call ``python -m unittest `` can now accept file paths
11351135 instead of module names for running specific tests (:issue: `10620 `). The new
11361136 test discovery can find tests within packages, locating any test importable
11371137 from the top level directory. The top level directory can be specified with
11381138 the `-t ` option, a pattern for matching files with ``-p ``, and a directory to
11391139 start discovery with ``-s ``::
11401140
1141- $ python -m unittest discover -s my_proj_dir -p ' _test.py'
1141+ $ python -m unittest discover -s my_proj_dir -p _test.py
11421142
11431143 (Contributed by Michael Foord.)
11441144
@@ -1171,7 +1171,7 @@ names.
11711171 (Contributed by Raymond Hettinger.)
11721172
11731173* A principal feature of the unittest module is an effort to produce meaningful
1174- diagnostics when a test fails. When possible the failure is recorded along
1174+ diagnostics when a test fails. When possible, the failure is recorded along
11751175 with a diff of the output. This is especially helpful for analyzing log files
11761176 of failed test runs. However, since diffs can sometime be voluminous, there is
11771177 a new :attr: `~unittest.TestCase.maxDiff ` attribute which sets maximum length of
@@ -1189,7 +1189,7 @@ names.
11891189
11901190 (Contributed by Raymond Hettinger and implemented by Ezio Melotti.)
11911191
1192- * To improve consistency, some of long-standing method aliases are being
1192+ * To improve consistency, some long-standing method aliases are being
11931193 deprecated in favor of the preferred names:
11941194
11951195 - replace :meth: `assert_ ` with :meth: `.assertTrue `
@@ -1252,7 +1252,7 @@ The :mod:`tempfile` module has a new context manager,
12521252cleanup of temporary directories:
12531253
12541254>>> with tempfile.TemporaryDirectory() as tmpdirname:
1255- ... print ' created temporary directory ' , tmpdirname
1255+ ... print ( ' created temporary dir: ' , tmpdirname)
12561256
12571257(Contributed by Neil Schemenauer and Nick Coghlan; :issue: `5178 `.)
12581258
@@ -1282,7 +1282,7 @@ window to display that server.
12821282sysconfig
12831283---------
12841284
1285- The new :mod: `sysconfig ` module makes it straight-forward to discover
1285+ The new :mod: `sysconfig ` module makes it straightforward to discover
12861286installation paths and configuration variables which vary across platforms and
12871287installations.
12881288
@@ -1291,8 +1291,8 @@ information:
12911291
12921292* :func: `~sysconfig.get_platform ` returning values like *linux-i586 * or
12931293 *macosx-10.6-ppc *.
1294- * :func: `~sysconfig.get_python_version ` returns a Python version string in
1295- the form, "3.2".
1294+ * :func: `~sysconfig.get_python_version ` returns a Python version string
1295+ such as "3.2".
12961296
12971297It also provides access to the paths and variables corresponding to one of
12981298seven named schemes used by :mod: `distutils `. Those include *posix_prefix *,
@@ -1350,13 +1350,13 @@ The :mod:`pdb` debugger module gained a number of usability improvements:
13501350* A :file: `.pdbrc ` script file can contain ``continue `` and ``next `` commands
13511351 that continue debugging.
13521352* The :class: `Pdb ` class constructor now accepts a *nosigint * argument.
1353- * new commands: ``l(list) ``, ``ll(long list `` and ``source `` for
1353+ * New commands: ``l(list) ``, ``ll(long list `` and ``source `` for
13541354 listing source code.
1355- * new commands: ``display `` and ``undisplay `` for showing or hiding
1355+ * New commands: ``display `` and ``undisplay `` for showing or hiding
13561356 the value of an expression if it has changed.
1357- * new command: ``interact `` for starting an interactive interpreter containing
1357+ * New command: ``interact `` for starting an interactive interpreter containing
13581358 the global and local names found in the current scope.
1359- * breakpoints can be cleared by breakpoint number
1359+ * Breakpoints can be cleared by breakpoint number.
13601360
13611361(Contributed by Georg Brandl, Antonio Cuni and Ilya Sandler.)
13621362
@@ -1509,12 +1509,12 @@ A number of small performance enhancements have been added:
15091509 :meth: `list.sort ` and :func: `sorted ` now runs faster and uses less memory
15101510 when called with a :term: `key function `. Previously, every element of
15111511 a list was wrapped with a temporary object that remembered the key value
1512- associated with each element. Now, an array of keys and values are
1512+ associated with each element. Now, two arrays of keys and values are
15131513 sorted in parallel. This save the memory consumed by the sort wrappers,
15141514 and it saves time lost during comparisons which were delegated by the
15151515 sort wrappers.
15161516
1517- (Patch by Daniel Stuzback in :issue: `9915 `.)
1517+ (Patch by Daniel Stutzback in :issue: `9915 `.)
15181518
15191519* JSON decoding performance is improved and memory consumption is reduced
15201520 whenever the same string is repeated for multiple keys. Also, JSON encoding
@@ -1544,11 +1544,11 @@ A number of small performance enhancements have been added:
15441544 (:issue: `6713 ` by Gawain Bolton, Mark Dickinson, and Victor Stinner.)
15451545
15461546There were several other minor optimizations. Set differencing now runs faster
1547- when one operand is much larger than the other (Patch by Andress Bennetts in
1547+ when one operand is much larger than the other (patch by Andress Bennetts in
15481548:issue: `8685 `). The :meth: `array.repeat ` method has a faster implementation
15491549(:issue: `1569291 ` by Alexander Belopolsky). The :class: `BaseHTTPRequestHandler `
15501550has more efficient buffering (:issue: `3709 ` by Andrew Schaaf). The
1551- multi-argument form of :func: `operator.attrgetter ` now function runs slightly
1551+ multi-argument form of :func: `operator.attrgetter ` function now runs slightly
15521552faster (:issue: `10160 ` by Christos Georgiou). And :class: `ConfigParser ` loads
15531553multi-line arguments a bit faster (:issue: `7113 ` by Łukasz Langa).
15541554
@@ -1598,7 +1598,7 @@ By default, tarfile uses ``'utf-8'`` encoding on Windows (instead of
15981598``'mbcs' ``), and the ``'surrogateescape' `` error handler on all operating
15991599systems.
16001600
1601- * Added the *cp720 * Arabic DOS encoding (:issue: `1616979 `).
1601+ Also, support was added for *cp720 * Arabic DOS encoding (:issue: `1616979 `).
16021602
16031603
16041604Documentation
@@ -1611,10 +1611,10 @@ A table of quick links has been added to the top of lengthy sections such as
16111611accompanied by tables of cheatsheet-style summaries to provide an overview and
16121612memory jog without having to read all of the docs.
16131613
1614- In some cases, the pure python source code can be helpful adjunct to the docs,
1614+ In some cases, the pure Python source code can be helpful adjunct to the docs,
16151615so now some modules feature quick links to the latest version of the source
16161616code. For example, the :mod: `functools ` module documentation has a quick link
1617- at the top labeled :source: ` functools Python source code < Lib/functools.py> `.
1617+ at the top labeled * Source code* source:` Lib/functools.py `.
16181618
16191619The docs now contain more examples and recipes. In particular, :mod: `re ` module
16201620has an extensive section, :ref: `re-examples `. Likewise, the :mod: `itertools `
@@ -1624,15 +1624,15 @@ The :mod:`datetime` module now has an auxiliary implementation in pure Python.
16241624No functionality was changed. This just provides an easier-to-read
16251625alternate implementation. (Contributed by Alexander Belopolsky.)
16261626
1627- The unmaintained * Demo * directory has been removed. Some demos were integrated
1628- into the documentation, some were moved to the * Tools/demo * directory, and
1629- others were removed altogether. (Contributed by Georg Brandl.)
1627+ The unmaintained :file: ` Demo ` directory has been removed. Some demos were
1628+ integrated into the documentation, some were moved to the :file: ` Tools/demo `
1629+ directory, and others were removed altogether. (Contributed by Georg Brandl.)
16301630
16311631
16321632IDLE
16331633====
16341634
1635- * The format menu now has an option to clean-up source files by stripping
1635+ * The format menu now has an option to clean source files by stripping
16361636 trailing whitespace.
16371637
16381638 (Contributed by Raymond Hettinger; :issue: `5150 `.)
@@ -1681,19 +1681,19 @@ Changes to Python's build process and to the C API include:
16811681 :issue: `9778 `.)
16821682
16831683* A new macro :c:macro: `Py_VA_COPY ` copies the state of the variable argument
1684- list. It is equivalent to C99 *va_copy * but available on all python platforms
1684+ list. It is equivalent to C99 *va_copy * but available on all Python platforms
16851685 (:issue: `2443 `).
16861686
1687- * A new C API function :c:func: `PySys_SetArgvEx ` allows an embedded
1688- interpreter to set sys.argv without also modifying :attr: `sys.path `
1687+ * A new C API function :c:func: `PySys_SetArgvEx ` allows an embedded interpreter
1688+ to set :attr: ` sys.argv ` without also modifying :attr: `sys.path `
16891689 (:issue: `5753 `).
16901690
16911691* :c:macro: `PyEval_CallObject ` is now only available in macro form. The
16921692 function declaration, which was kept for backwards compatibility reasons, is
1693- now removed -- the macro was introduced in 1997 (:issue: `8276 `).
1693+ now removed -- the macro was introduced in 1997 (:issue: `8276 `).
16941694
16951695* The is a new function :c:func: `PyLong_AsLongLongAndOverflow ` which
1696- is analogous to :c:func: `PyLong_AsLongAndOverflow `. The both serve to
1696+ is analogous to :c:func: `PyLong_AsLongAndOverflow `. They both serve to
16971697 convert Python :class: `int ` into a native fixed-width type while providing
16981698 detection of cases where the conversion won't fit (:issue: `7767 `).
16991699
@@ -1710,7 +1710,7 @@ Changes to Python's build process and to the C API include:
17101710 gives improved memory leak detection when running under Valgrind, while taking
17111711 advantage of pymalloc at other times (:issue: `2422 `).
17121712
1713- * Removed the "O?" format from the *PyArg_Parse * functions. The format is no
1713+ * Removed the `` O? `` format from the *PyArg_Parse * functions. The format is no
17141714 longer used and it had never been documented (:issue: `8837 `).
17151715
17161716There were a number of other small changes to the C-API. See the
@@ -1779,7 +1779,7 @@ require changes to your code:
17791779 ``random.seed(s, version=1) ``.
17801780
17811781* The previously deprecated :func: `string.maketrans ` function has been removed
1782- in favor of the static methods, :meth: `bytes.maketrans ` and
1782+ in favor of the static method :meth: `bytes.maketrans ` and
17831783 :meth: `bytearray.maketrans `. This change solves the confusion around which
17841784 types were supported by the :mod: `string ` module. Now, :class: `str `,
17851785 :class: `bytes `, and :class: `bytearray ` each have their own **maketrans ** and
@@ -1805,13 +1805,13 @@ require changes to your code:
18051805* :func: `struct.pack ` now only allows bytes for the ``s `` string pack code.
18061806 Formerly, it would accept text arguments and implicitly encode them to bytes
18071807 using UTF-8. This was problematic because it made assumptions about the
1808- correct encoding and because a variable length encoding can fail when writing
1808+ correct encoding and because a variable- length encoding can fail when writing
18091809 to fixed length segment of a structure.
18101810
18111811 Code such as ``struct.pack('<6sHHBBB', 'GIF87a', x, y) `` should be rewritten
18121812 with to use bytes instead of text, ``struct.pack('<6sHHBBB', b'GIF87a', x, y) ``.
18131813
1814- (Discovered by David Beazley and fixed by Victor Stinner; :issue: `10783 `.
1814+ (Discovered by David Beazley and fixed by Victor Stinner; :issue: `10783 `.)
18151815
18161816* The :class: `xml.etree.ElementTree ` class now raises an
18171817 :exc: `xml.etree.ElementTree.ParseError ` when a parse fails. Previously it
0 commit comments