Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(67570)

#11175: allow argparse FileType to accept encoding and errors arguments

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 7 months ago by steven.bethard
Modified:
6 years, 6 months ago
Reviewers:
ezio.melotti, lucas.maystre
CC:
amaury.forgeotdarc, bethard, ezio.melotti, eric.araujo, cjerdonek, devnull_psf.upfronthosting.co.za, Petri Lehtinen, lum
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Total comments: 2

Patch Set 4 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/argparse.rst View 1 2 3 2 chunks +11 lines, -9 lines 0 comments Download
Lib/argparse.py View 1 2 3 2 chunks +13 lines, -3 lines 0 comments Download
Lib/test/test_argparse.py View 1 2 3 3 chunks +32 lines, -0 lines 0 comments Download

Messages

Total messages: 2
ezio.melotti
http://bugs.python.org/review/11175/diff/6695/Doc/library/argparse.rst File Doc/library/argparse.rst (right): http://bugs.python.org/review/11175/diff/6695/Doc/library/argparse.rst#newcode1630 Doc/library/argparse.rst:1630: >>> parser.add_argument('out', type=argparse.FileType('w', encoding='l1')) I wouldn't use l1, in ...
6 years, 6 months ago #1
lum
6 years, 6 months ago #2
http://bugs.python.org/review/11175/diff/6695/Doc/library/argparse.rst
File Doc/library/argparse.rst (right):

http://bugs.python.org/review/11175/diff/6695/Doc/library/argparse.rst#newcod...
Doc/library/argparse.rst:1630: >>> parser.add_argument('out',
type=argparse.FileType('w', encoding='l1'))
On 2012/11/27 21:51:09, ezio.melotti wrote:
> I wouldn't use l1, in the example, because it's not the encoding that I would
> advise people to use and because this is not a well known alias.
> You could use utf-8 instead (even if it might be redundant if it's the
default).

Done.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+