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

Skip to content

Commit fced3ec

Browse files
committed
whatsnew: argparse FileType accepts errors and encodings args.
1 parent 2bc930f commit fced3ec

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Doc/library/argparse.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,6 +1671,9 @@ FileType objects
16711671
>>> parser.parse_args(['-'])
16721672
Namespace(infile=<_io.TextIOWrapper name='<stdin>' encoding='UTF-8'>)
16731673

1674+
.. versionadded:: 3.4
1675+
The *encodings* and *errors* keyword arguments.
1676+
16741677

16751678
Argument groups
16761679
^^^^^^^^^^^^^^^

Doc/whatsnew/3.4.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,14 @@ The :meth:`~aifc.getparams` method now returns a namedtuple rather than a
495495
plain tuple. (Contributed by Claudiu Popa in :issue:`17818`.)
496496

497497

498+
argparse
499+
--------
500+
501+
The :class:`~argparse.FileType` class now accepts *encoding* and
502+
*errors* arguments, which are passed through to :func:`open`. (Contributed
503+
by Lucas Maystre in :issue:`11175`.)
504+
505+
498506
audioop
499507
-------
500508

0 commit comments

Comments
 (0)