You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See also bpo-14191, which describes the problems of trying to make argparse achieve the goal of the default optparse handling of allow_interspersed_args !
The documentation for that branch of the feature is also seriously incomplete, and the workaround is more than a single line.
Activity
nejucomo commentedon Jul 5, 2012
It was not obvious from the documentation on argparse how to emulate the optparse.OptionParser.allow_interspersed_args feature.
Please add something like the following to the section titled "Upgrading optparse code" (see: http://docs.python.org/library/argparse.html#upgrading-optparse-code )
"""
"""
vpython commentedon Jul 6, 2012
See also bpo-14191, which describes the problems of trying to make argparse achieve the goal of the default optparse handling of allow_interspersed_args !
The documentation for that branch of the feature is also seriously incomplete, and the workaround is more than a single line.
berkerpeksag commentedon Aug 14, 2018
ArgumentParser.parse_intermixed_arg() has been added in 0f6b9d2 (bpo-14191) and the "Upgrading optparse code" section now has the following item:
by using ArgumentParser.parse_intermixed_args() instead of
ArgumentParser.parse_args().
Closing this as 'outdated'.