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 stephan
Recipients stephan
Date 2016-09-20.08:43:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474361034.47.0.927422929015.issue28210@psf.upfronthosting.co.za>
In-reply-to
Content
In python 2.7.12 I get an error if I do not pass
arguments, while in python 3.5.2 I do not get
the error (it fails silently).
Stumbled on this during my migration of my python 2.7 code to python 3.5 for django.

Here is the console output:

D:\util\python\test>py -3 test_argparse.py
3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]
Use subparsers: True
Namespace(command=None)

D:\util\python\test>py -2 test_argparse.py
2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)]
Use subparsers: True
usage: test_argparse.py [-h] command ...
test_argparse.py: error: too few arguments

D:\util\python\test>
History
Date User Action Args
2016-09-20 08:43:54stephansetrecipients: + stephan
2016-09-20 08:43:54stephansetmessageid: <1474361034.47.0.927422929015.issue28210@psf.upfronthosting.co.za>
2016-09-20 08:43:54stephanlinkissue28210 messages
2016-09-20 08:43:54stephancreate