Message175377
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. |
|
Date |
User |
Action |
Args |
2012-11-11 17:53:22 | terry.reedy | set | recipients:
+ terry.reedy, bethard, ezio.melotti, r.david.murray, chris.jerdonek, docs@python, Juraj.Variny |
2012-11-11 17:53:22 | terry.reedy | set | messageid: <1352656402.38.0.843121187183.issue16418@psf.upfronthosting.co.za> |
2012-11-11 17:53:22 | terry.reedy | link | issue16418 messages |
2012-11-11 17:53:22 | terry.reedy | create | |
|