Skip to content

Typos in 3.10 "What's new" #25104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ Several other key features:
- Mapping patterns: ``{"bandwidth": b, "latency": l}`` captures the
``"bandwidth"`` and ``"latency"`` values from a dict. Unlike sequence
patterns, extra keys are ignored. A wildcard ``**rest`` is also
supported. (But ``**_`` would be redundant, so it not allowed.)
supported. (But ``**_`` would be redundant, so is not allowed.)

- Subpatterns may be captured using the ``as`` keyword::

Expand Down Expand Up @@ -462,13 +462,13 @@ Optional ``EncodingWarning`` and ``encoding="locale"`` option
The default encoding of :class:`TextIOWrapper` and :func:`open` is
platform and locale dependent. Since UTF-8 is used on most Unix
platforms, omitting ``encoding`` option when opening UTF-8 files
(e.g. JSON, YAML, TOML, Markdown) is very common bug. For example::
(e.g. JSON, YAML, TOML, Markdown) is a very common bug. For example::

# BUG: "rb" mode or encoding="utf-8" should be used.
with open("data.json") as f:
data = json.laod(f)
data = json.load(f)

To find this type of bugs, optional ``EncodingWarning`` is added.
To find this type of bug, optional ``EncodingWarning`` is added.
It is emitted when :data:`sys.flags.warn_default_encoding <sys.flags>`
is true and locale-specific default encoding is used.

Expand Down