New submission from Demid <[email protected]>:
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('-x', type=argparse.FileType)
----------
components: Library (Lib)
messages: 344568
nosy: zygocephalus
priority: normal
severity: normal
status: open
title: Do not allow to pass FileType class object instead of instance in
add_argument
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37150>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com