mirror of
https://github.com/python/cpython.git
synced 2024-12-12 03:04:15 +08:00
whatsnew: argparse FileType accepts errors and encodings args.
This commit is contained in:
parent
2bc930f044
commit
fced3ec2db
@ -1671,6 +1671,9 @@ FileType objects
|
|||||||
>>> parser.parse_args(['-'])
|
>>> parser.parse_args(['-'])
|
||||||
Namespace(infile=<_io.TextIOWrapper name='<stdin>' encoding='UTF-8'>)
|
Namespace(infile=<_io.TextIOWrapper name='<stdin>' encoding='UTF-8'>)
|
||||||
|
|
||||||
|
.. versionadded:: 3.4
|
||||||
|
The *encodings* and *errors* keyword arguments.
|
||||||
|
|
||||||
|
|
||||||
Argument groups
|
Argument groups
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
|
@ -495,6 +495,14 @@ The :meth:`~aifc.getparams` method now returns a namedtuple rather than a
|
|||||||
plain tuple. (Contributed by Claudiu Popa in :issue:`17818`.)
|
plain tuple. (Contributed by Claudiu Popa in :issue:`17818`.)
|
||||||
|
|
||||||
|
|
||||||
|
argparse
|
||||||
|
--------
|
||||||
|
|
||||||
|
The :class:`~argparse.FileType` class now accepts *encoding* and
|
||||||
|
*errors* arguments, which are passed through to :func:`open`. (Contributed
|
||||||
|
by Lucas Maystre in :issue:`11175`.)
|
||||||
|
|
||||||
|
|
||||||
audioop
|
audioop
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user