New submission from Demid :
There is a possibility that someone (like me) accidentally will omit
parentheses with FileType arguments after FileType, and parser will contain
wrong file until someone will try to use it.
Example:
parser = argparse.ArgumentParser()
parser.add_argument(
Change by Demid :
--
keywords: +patch
pull_requests: +13690
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13805
___
Python tracker
<https://bugs.python.org/issu
Change by Demid :
--
nosy: +zygocephalus -dm
___
Python tracker
<https://bugs.python.org/issue37144>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Demid :
--
nosy: +dm
___
Python tracker
<https://bugs.python.org/issue37144>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by Demid :
--
keywords: +patch
pull_requests: +13703
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13817
___
Python tracker
<https://bugs.python.org/issu
Demid added the comment:
If you will run `python test.py hello.txt, where test.py is:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('echo', type=argparse.FileType)
args = parser.parse_args()
print(args.echo)
You will receive:
FileType('hello.txt'
Demid added the comment:
What if I will add mode check in FileType.__init__?
--
___
Python tracker
<https://bugs.python.org/issue37150>
___
___
Python-bug