gh-96548: argparse: Remove unused name variable when handling ArgumentTypeError#96549
Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
In my opinion, this fix is too trivial to warrant a NEWS entry. There is no user-visible change in behavior whatsoever. |
|
Looks good, thanks. Going to change this in main only since it doesn't seem like it could cause a user-visible bug. |
Agreed, this is just a code cleanliness thing. FWIW I discovered this while looking at the code to understand how exceptions from |
This removes the unused
namevariable in the block whereArgumentTypeErroris handled.ArgumentTypeErrorerrors are handled by showing just the string of the exception; unlikeValueError, the name (__name__) of the function is not included in the error message.Fixes #96548