@@ -420,7 +420,7 @@ Several other key features:
420
420
- Mapping patterns: `` {" bandwidth" : b, " latency" : l}`` captures the
421
421
`` " bandwidth" `` and `` " latency" `` values from a dict . Unlike sequence
422
422
patterns, extra keys are ignored. A wildcard `` ** rest`` is also
423
- supported. (But `` ** _`` would be redundant, so it not allowed.)
423
+ supported. (But `` ** _`` would be redundant, so is not allowed.)
424
424
425
425
- Subpatterns may be captured using the `` as `` keyword::
426
426
@@ -462,13 +462,13 @@ Optional ``EncodingWarning`` and ``encoding="locale"`` option
462
462
The default encoding of :class :`TextIOWrapper` and :func:`open ` is
463
463
platform and locale dependent. Since UTF - 8 is used on most Unix
464
464
platforms, omitting `` encoding`` option when opening UTF - 8 files
465
- (e.g. JSON , YAML , TOML , Markdown) is very common bug. For example::
465
+ (e.g. JSON , YAML , TOML , Markdown) is a very common bug. For example::
466
466
467
467
# BUG : "rb" mode or encoding="utf-8" should be used.
468
468
with open (" data.json" ) as f:
469
- data = json.laod (f)
469
+ data = json.load (f)
470
470
471
- To find this type of bugs , optional `` EncodingWarning`` is added.
471
+ To find this type of bug , optional `` EncodingWarning`` is added.
472
472
It is emitted when :data:`sys.flags.warn_default_encoding < sys.flags> `
473
473
is true and locale- specific default encoding is used.
474
474
0 commit comments