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 rgov
Date 2018-12-14.15:59:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za>
In-reply-to
Content
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('things', nargs=argparse.REMAINDER, default=['nothing'])
parser.parse_args([])
>>> Namespace(things=[])

Since there were no unparsed arguments remaining, the `default` setting for `things` should have been honored. However it silently ignores this setting.

If there's a reason why this wouldn't be desirable, it should raise an exception that the options aren't compatible.
History
Date User Action Args
2018-12-14 15:59:40rgovsetrecipients: + rgov
2018-12-14 15:59:40rgovsetmessageid: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za>
2018-12-14 15:59:40rgovlinkissue35495 messages
2018-12-14 15:59:40rgovcreate