whatsnew: argparse FileType accepts errors and encodings args.

This commit is contained in:
R David Murray 2013-12-31 11:18:01 -05:00
parent 2bc930f044
commit fced3ec2db
2 changed files with 11 additions and 0 deletions

View File

@ -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
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^

View File

@ -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
------- -------