[issue41769] Positional arguments with boolean actions behave differently

2020-09-21 Thread Rafael Guterres Jeffman
Rafael Guterres Jeffman added the comment: I don't think many users will try to use a boolean positional argument. I only excited this behavior because I was writing an abstraction over argparse to define the command line interface based on a configuration file, and I was trying to add some

[issue41769] Positional arguments with boolean actions behave differently

2020-09-20 Thread paul j3
paul j3 added the comment: 'store_true/false' are subclasses of 'store_const'. All have a 'nargs=0' value. It's that value which explains their behavior. ('append_const' would also fall in this category) In [2]: parser = argparse.ArgumentParser() In [3]: parser.add_argument('foo',

[issue41769] Positional arguments with boolean actions behave differently

2020-09-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: You think the behavior is wrong. Does it disagree with the doc? If not, this is an design change (enhancement) issue limited to future version. If so, it might be a bug that can be backported. However, when I run the code on Windows with an argument