[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-09-04 Thread Sworddragon
Sworddragon added the comment: I was thinking about cases where the default is variable for example a call to platform.machine() while the choices list (and the script itself) might not support all exotic architectures for its use that might be returned now or in a future version of Python

[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-09-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Which module are you asking about? We could ask author of behavior in question as to intention. -- nosy: +terry.reedy ___ Python tracker

[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-09-04 Thread R. David Murray
R. David Murray added the comment: I assume you are talking about the behavior of the argparse 'choices' feature? That is what my comment was addressed to. I didn't actually run a test to see if it behaves the way you describe :) -- ___ Python

[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-09-04 Thread paul j3
paul j3 added the comment: A related issue which Sworddragon found just before starting this issue is http://bugs.python.org/issue9625 The handling of defaults in argparse is a bit complicated. In general it errs on the side of giving the user/developer freedom to set them how ever they

[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-09-04 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list

[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-09-04 Thread R. David Murray
R. David Murray added the comment: OK, I'm going to close this as "not a bug" then, as it seems to be an intentional design decision. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-08-29 Thread R. David Murray
R. David Murray added the comment: That might be intentional, and in any case fixing it would be backward incompatible. I think we should just live with it. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org