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 terry.reedy
Recipients Juraj.Variny, bethard, chris.jerdonek, docs@python, ezio.melotti, r.david.murray, terry.reedy
Date 2012-11-11.17:53:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1352656402.38.0.843121187183.issue16418@psf.upfronthosting.co.za>
In-reply-to
Content
Juraj: Is the example behavior from Py2 or Py3? The meaning of 'range' changed. In Py2, xrange would be the correct choice for 'choice'.

Does argparse actually convert (x)range objects to a list or set (the help indicates the latter) for internal use? That would be foolish as 'n in <range>' is an O(1) operation. (I don't remember is that works for xrange.) For instance, range(0, 1000, 2) is a nice way to say 'even count less than 1000'.

If it is not so converted, converting for display is also foolish.
'range(0, 1000, 2)' is clearer than an explicit sequence.
History
Date User Action Args
2012-11-11 17:53:22terry.reedysetrecipients: + terry.reedy, bethard, ezio.melotti, r.david.murray, chris.jerdonek, docs@python, Juraj.Variny
2012-11-11 17:53:22terry.reedysetmessageid: <1352656402.38.0.843121187183.issue16418@psf.upfronthosting.co.za>
2012-11-11 17:53:22terry.reedylinkissue16418 messages
2012-11-11 17:53:22terry.reedycreate