Commit 5fee791
committed
gh-143984: Replace optparse with argparse in Lib/test/test_decimal.py
The optparse module is deprecated since Python 3.2. This change migrates
Lib/test/test_decimal.py to use the argparse module for command line
argument parsing.
This involves:
- Importing argparse instead of optparse.
- Using ArgumentParser instead of OptionParser.
- Updating argument definitions (add_argument).
- Escaping '%' characters in help strings.
- Updating execution logic to use the argparse Namespace object.1 parent 7e28ae5 commit 5fee791
1 file changed
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6028 | 6028 | | |
6029 | 6029 | | |
6030 | 6030 | | |
6031 | | - | |
6032 | | - | |
6033 | | - | |
6034 | | - | |
6035 | | - | |
6036 | | - | |
6037 | | - | |
| 6031 | + | |
| 6032 | + | |
| 6033 | + | |
| 6034 | + | |
| 6035 | + | |
| 6036 | + | |
| 6037 | + | |
| 6038 | + | |
6038 | 6039 | | |
6039 | | - | |
6040 | | - | |
| 6040 | + | |
| 6041 | + | |
6041 | 6042 | | |
6042 | 6043 | | |
0 commit comments