[issue39716] argparse.ArgumentParser does not raise on duplicated subparsers, even though it does on duplicated flags

2020-02-22 Thread Antony Lee
Antony Lee added the comment: Sure, https://github.com/python/cpython/pull/18605 it is. -- ___ Python tracker ___ ___

[issue39716] argparse.ArgumentParser does not raise on duplicated subparsers, even though it does on duplicated flags

2020-02-22 Thread Antony Lee
Change by Antony Lee : -- keywords: +patch pull_requests: +17971 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18605 ___ Python tracker ___

[issue39716] argparse.ArgumentParser does not raise on duplicated subparsers, even though it does on duplicated flags

2020-02-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Would you like to work-up a patch to fix this? -- ___ Python tracker ___ ___ Python-bugs-list

[issue39716] argparse.ArgumentParser does not raise on duplicated subparsers, even though it does on duplicated flags

2020-02-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +paul.j3, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39716] argparse.ArgumentParser does not raise on duplicated subparsers, even though it does on duplicated flags

2020-02-21 Thread Antony Lee
New submission from Antony Lee : If one tries to add twice the same flag to an ArgumentParser, one gets a helpful exception: from argparse import ArgumentParser p = ArgumentParser() p.add_argument("--foo") p.add_argument("--foo") results in argparse.ArgumentError: