diff options
Diffstat (limited to 'Lib/argparse.py')
| -rw-r--r-- | Lib/argparse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py index 9a67b41ae0..5820d0d8ca 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -2132,7 +2132,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer): action = self._option_string_actions[option_string] return action, option_string, explicit_arg - if self.allow_abbrev: + if self.allow_abbrev or not arg_string.startswith('--'): # search through all possible prefixes of the option string # and all actions in the parser for possible interpretations option_tuples = self._get_option_tuples(arg_string) |
