8000 GH-123945: Update regex for parsing negative numbers that contain underscores by savannahostrowski · Pull Request #123970 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-123945: Update regex for parsing negative numbers that contain underscores #123970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 17, 2024
Merged
Prev Previous commit
Next Next commit
add newline back
  • Loading branch information
savannahostrowski committed Sep 12, 2024
commit af017edaa40a37d3699e44d570f5c2753e93dcee
1 change: 1 addition & 0 deletions Lib/argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,7 @@ def __init__(self,

# determines whether an "option" looks like a negative number
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
self._has_negative_number_optionals = []
Expand Down
Loading
0