The "--" should not be included with long options passed to
getopt.getopt.
Fixes https://bugs.python.org/issue37803
(cherry picked from commit
855df7f273c3988c72f01e51ba57091887ec38b2)
Co-authored-by: Daniel Hahler <github@thequod.de>
def main():
import getopt
- opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['--help', '--command='])
+ opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['help', 'command='])
if not args:
print(_usage)
--- /dev/null
+pdb's ``--help`` and ``--version`` long options now work.