This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jessehostetler
Recipients jessehostetler
Date 2018-09-25.22:31:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The 'argparse' module gives a parse error for integer arguments written in scientific notation. I would expect this to work, since integers can be constructed from literals in scientific notation.

Example (also attached):

import argparse
foo = int(1e3) # Works: foo = 1000
parser = argparse.ArgumentParser()
parser.add_argument( "--foo", type=int )
parser.parse_args( ["--foo=1e3"] )
# error: argument --foo: invalid int value: '1e3'
Date User Action Args
2018-09-25 22:31:02jessehostetlersetrecipients: + jessehostetler
2018-09-25 22:31:02jessehostetlersetmessageid: <>
2018-09-25 22:31:02jessehostetlerlinkissue34803 messages
2018-09-25 22:31:02jessehostetlercreate