According to https://docs.python.org/2/library/optparse.html:
Deprecated since version 2.7: The optparse module is deprecated and will not be developed further; development will continue with the argparse module.
Since argparse is also available starting in Python 2.7, we aren't losing any compatibility with Python 2.x by switching to it, and we'll become forward-compatible with Python 3.x and beyond as optparse will likely be removed from Python stdlib at some point.
According to https://docs.python.org/2/library/optparse.html:
Since
argparseis also available starting in Python 2.7, we aren't losing any compatibility with Python 2.x by switching to it, and we'll become forward-compatible with Python 3.x and beyond asoptparsewill likely be removed from Python stdlib at some point.