diff -r a88310d86455 Lib/argparse.py
--- a/Lib/argparse.py Sun Apr 14 19:22:47 2013 +0200
+++ b/Lib/argparse.py Wed Apr 17 15:06:13 2013 -0700
@@ -1856,8 +1856,13 @@
action = optionals_map[option_string]
explicit_arg = new_explicit_arg
else:
- msg = _('ignored explicit argument %r')
- raise ArgumentError(action, msg % explicit_arg)
+ if False:
+ msg = _('ignored explicit argument %r')
+ raise ArgumentError(action, msg % explicit_arg)
+ else:
+ # alt handling of unknown explicit_arg
+ extras.append(explicit_arg)
+ return start_index + 1
# if the action expect exactly one argument, we've
# successfully matched the option; exit the loop