SIGN IN SIGN UP

bpo-14156: Make argparse.FileType work correctly for binary file modes when argument is '-' (GH-13165)

Also made modes containing 'a' or 'x' act the same as a mode containing 'w' when argument is '-'
(so 'a'/'x' return sys.stdout like 'w', and 'ab'/'xb' return sys.stdout.buffer like 'wb').
(cherry picked from commit eafec26ae5327bb23b6dace2650b074c3327dfa0)

Co-authored-by: MojoVampire <shadowranger+github@gmail.com>
M
Miss Islington (bot) committed
ee18df425209cfa4f394b57220177c168fc3a1da
Parent: 4716f70
Committed by GitHub <noreply@github.com> on 3/6/2022, 12:12:06 PM