diff options
author | steven.bethard <devnull@localhost> | 2009-10-09 18:06:46 +0000 |
---|---|---|
committer | steven.bethard <devnull@localhost> | 2009-10-09 18:06:46 +0000 |
commit | 7fc9baae61b571e086e08b00e20cfa4377363cbc (patch) | |
tree | 6e41b3b3bd83df6b4aea574c2f7d33a9af797868 /argparse.py | |
parent | 7cc6c3f3317aebace4fe1e10dc926a9bf595c4f0 (diff) | |
download | argparse-7fc9baae61b571e086e08b00e20cfa4377363cbc.tar.gz |
Fix bug where options with a single letter were being considered as numbers.
Diffstat (limited to 'argparse.py')
-rw-r--r-- | argparse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/argparse.py b/argparse.py index 2ba966c..1ab2a53 100644 --- a/argparse.py +++ b/argparse.py @@ -1203,7 +1203,7 @@ class _ActionsContainer(object): self._defaults = {} # determines whether an "option" looks like a negative number - self._negative_number_matcher = _re.compile(r'^-\d+|-\d*.\d+$') + self._negative_number_matcher = _re.compile(r'^-\d+$|^-\d*\.\d+$') # whether or not there are any optionals that look like negative # numbers -- uses a list so it can be shared and edited |