homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author BreamoreBoy
Recipients BreamoreBoy, Jason.Baker, bethard, eric.araujo, ned.deily
Date 2013年04月15日.00:07:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365984464.63.0.985045868365.issue9849@psf.upfronthosting.co.za>
In-reply-to
Content
The behaviour has changed from that given in msg116355. Using Python 3.3.1 on Windows.
>>> import argparse
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('foo', nargs='1')
Traceback (most recent call last):
 File "c:\python33\lib\argparse.py", line 1322, in add_argument
 self._get_formatter()._format_args(action, None)
 File "c:\python33\lib\argparse.py", line 585, in _format_args
 formats = ['%s' for _ in range(action.nargs)]
TypeError: 'str' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "c:\python33\lib\argparse.py", line 1324, in add_argument
 raise ValueError("length of metavar tuple does not match nargs")
ValueError: length of metavar tuple does not match nargs
The docs http://docs.python.org/3/library/argparse.html#nargs are clear that nargs is an integer or various types of string so I think this could be closed as already fixed.
History
Date User Action Args
2013年04月15日 00:07:44BreamoreBoysetrecipients: + BreamoreBoy, bethard, ned.deily, eric.araujo, Jason.Baker
2013年04月15日 00:07:44BreamoreBoysetmessageid: <1365984464.63.0.985045868365.issue9849@psf.upfronthosting.co.za>
2013年04月15日 00:07:44BreamoreBoylinkissue9849 messages
2013年04月15日 00:07:44BreamoreBoycreate

AltStyle によって変換されたページ (->オリジナル) /