From: R David Murray Date: Tue, 31 Dec 2013 16:18:01 +0000 (-0500) Subject: whatsnew: argparse FileType accepts errors and encodings args. X-Git-Tag: v3.4.0b2~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fced3ec2db437097e45e1311c321a74cf96a4a06;p=thirdparty%2FPython%2Fcpython.git whatsnew: argparse FileType accepts errors and encodings args. --- diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 51abc7a90965..b1b5135eac18 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1671,6 +1671,9 @@ FileType objects >>> parser.parse_args(['-']) Namespace(infile=<_io.TextIOWrapper name='' encoding='UTF-8'>) + .. versionadded:: 3.4 + The *encodings* and *errors* keyword arguments. + Argument groups ^^^^^^^^^^^^^^^ diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 5b682439450c..19d71ccbf1d2 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -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`.) +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 -------