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

Skip to content

Commit d73be67

Browse files
committed
Minor wordsmithing and markup fix-ups.
1 parent 3094ed8 commit d73be67

1 file changed

Lines changed: 25 additions & 22 deletions

File tree

Doc/whatsnew/3.2.rst

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
http://news.blogs.cnn.com/2010/12/17/final-lunar-eclipse-of-2010-set-for-early-morning-of-december-21/?hpt=T2http://news.blogs.cnn.com/2010/12/17/final-lunar-eclipse-of-2010-set-for-early-morning-of-december-21/?hpt=T2****************************
1+
****************************
22
What's New In Python 3.2
33
****************************
44

@@ -1617,33 +1617,36 @@ Porting to Python 3.2
16171617
This section lists previously described changes and other bugfixes that may
16181618
require changes to your code:
16191619

1620-
* The :mod:`configparser` class :class:`SafeConfigParser` has been updated and
1621-
renamed to :class:`ConfigParser` whereas the old :class:`ConfigParser` class
1622-
has been removed. This means a couple of minor incompatibilities:
1620+
* The :mod:`configparser` module has a number of clean-ups. The major change is
1621+
to replace the old :class:`ConfigParser` class with long-standing preferred
1622+
alternative :class:`SafeConfigParser`. In addition there are a number of
1623+
smaller incompatibilites:
16231624

1624-
* interpolation syntax is now validated on :meth:`get` and :meth:`set`
1625-
operations. In the default interpolation scheme, only two tokens with
1626-
percent signs are valid: %(name)s and %%, the latter being an escaped
1627-
percent sign. If that is not welcome, consider using
1628-
:class:`ExtendedInterpolation` or none at all.
1625+
* The interpolation syntax is now validated on
1626+
:meth:`~configparser.ConfigParser.get` and
1627+
:meth:`~configparser.ConfigParser.set` operations. In the default
1628+
interpolation scheme, only two tokens with percent signs are valid: ``%(name)s``
1629+
and ``%%``, the latter being an escaped percent sign.
16291630

1630-
* :meth:`set` and :meth:`add_section` now check whether the given value type
1631-
is a string. :mod:`configparser` was never designed to hold non-string
1632-
values internally.
1631+
* The :meth:`~configparser.ConfigParser.set` and
1632+
:meth:`~configparser.ConfigParser.add_section` methods now verify that
1633+
values are actual strings. Formerly, unsupported types could be introduced
1634+
unintentionally.
16331635

1634-
* exception is raised on any section or option duplicates that appear when
1635-
reading a single source. This exposes mistakes in user configuration.
1636+
* Duplicate sections or options now raise either
1637+
:exc:`~configparser.DuplicateSectionError` or
1638+
:exc:`~configparser.DuplicateOptionError`. Formerly, duplicates would
1639+
silently overwrite a previous entry.
16361640

1637-
* inline comments are now disabled by default which means the ``;`` character
1638-
can be safeuly used in values (``#`` was never allowed as inline comment).
1641+
* Inline comments are now disabled by default so now the **;** character
1642+
can be safely used in values.
16391643

1640-
* comments now can be indented which means for ``;`` and ``#`` to appear at
1641-
the start of a line in multiline values, it has to be interpolated. This is
1642-
preferable because in INI files a character that is also a comment prefix
1643-
cannot be taken for a comment by mistake.
1644+
* Comments now can be indented. Consequently, for **;** or **#** to appear at
1645+
the start of a line in multiline values, it has to be interpolated. This
1646+
keep comment prefix characters in value from being mistaken as comments.
16441647

1645-
* ``""`` is now a valid value, no longer automatically converted to an empty
1646-
string. For empty strings users can use ``"option ="`` in a line.
1648+
* ``""`` is now a valid value and is no longer automatically converted to an
1649+
empty string. For empty strings, use ``"option ="`` in a line.
16471650

16481651
* The :mod:`nntplib` module was reworked extensively, meaning that its APIs
16491652
are often incompatible with the 3.1 APIs.

0 commit comments

Comments
 (0)