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 rgov
Recipients bethard, mblahay, paul.j3, rgov
Date 2019-05-08.02:07:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMtyXZY07hUMTROZ-s-HmS_KCbxM2SCCMF9jkEjBP8sMGh34ug@mail.gmail.com>
In-reply-to <1557263442.04.0.183290629047.issue35495@roundup.psfhosted.org>
Content
Just don’t run the last line which is just an echoing of the output of
parser.parse_args() repeated. The Namespace type would need to be imported
if you really wanted to but there’s no point.

On Tuesday, May 7, 2019, Michael Blahay <report@bugs.python.org> wrote:

>
> Michael Blahay <mblahay@gmail.com> added the comment:
>
> Ryan, what are the exact steps to reproduce the problem? This is what I
> get when I run the code you included:
>
> >>> import argparse
> >>> parser = argparse.ArgumentParser()
> >>> parser.add_argument('things', nargs=argparse.REMAINDER,
> default=['nothing'])
> _StoreAction(option_strings=[], dest='things', nargs='...', const=None,
> default=['nothing'], type=None, choices=None, help=None, metavar=None)
> >>> parser.parse_args([])
> Namespace(things=[])
> >>> Namespace(things=[])
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> NameError: name 'Namespace' is not defined
>
> ----------
> nosy: +mblahay
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue35495>
> _______________________________________
>
History
Date User Action Args
2019-05-08 02:07:54rgovsetrecipients: + rgov, bethard, paul.j3, mblahay
2019-05-08 02:07:54rgovlinkissue35495 messages
2019-05-08 02:07:53rgovcreate