[issue8538] Add FlagAction to argparse

2019-09-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I have merged the PR 11478 and this feature will be included into 3.9. Thank you for your proposal of Remi and thank you to Eric for the idea of this feature. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue8538] Add FlagAction to argparse

2019-09-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: New changeset 6a517c674907c195660fa9178a7b561de49cc721 by Stéphane Wirtel (Rémi Lapeyre) in branch 'master': bpo-8538: Add support for boolean actions to argparse (GH-11478) https://github.com/python/cpython/commit/6a517c674907c195660fa9178a7b561de49cc721

[issue8538] Add FlagAction to argparse

2019-09-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I am also interested by this feature. -- nosy: +matrixise ___ Python tracker ___ ___

[issue8538] Add FlagAction to argparse

2019-09-13 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- versions: +Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue8538] Add FlagAction to argparse

2019-01-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I made a first proposal for this feature in PR 11478, I had to adapt argparse.Action to customize how the action is represented in the usage string by adding a format_usage() method that would default to the current behavior if not overridden. Other methods

[issue8538] Add FlagAction to argparse

2019-01-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch, patch pull_requests: +10987, 10988, 10989 stage: needs patch -> patch review ___ Python tracker ___

[issue8538] Add FlagAction to argparse

2019-01-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch pull_requests: +10987, 10988 stage: needs patch -> patch review ___ Python tracker ___

[issue8538] Add FlagAction to argparse

2019-01-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +10987 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue8538] Add FlagAction to argparse

2019-01-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > I also removed myself from the issue, I'm not interested to implement it. I would like to try and implement the change. I will open a PR shortly. -- nosy: +remi.lapeyre ___ Python tracker

[issue8538] Add FlagAction to argparse

2019-01-04 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue since it seems like there are people requesting the feature. (I also removed myself from the issue, I'm not interested to implement it.) -- resolution: out of date -> status: closed -> open ___

[issue8538] Add FlagAction to argparse

2018-12-27 Thread Ken Williams
Ken Williams added the comment: Thanks, Paul and Eric, for your very quick replies. You're quite correct, the original question in https://stackoverflow.com/a/15008806/169947 is indeed hoping for `--foo TRUE` and `--foo False` etc. to work. Personally I don't like that as much as the

[issue8538] Add FlagAction to argparse

2018-12-27 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, this is the correct bug tracker. And note that this code isn't mine, I just posted it here so it wouldn't be lost. It looks like the original message was from https://mail.python.org/pipermail/python-dev/2010-April/099704.html --

[issue8538] Add FlagAction to argparse

2018-12-27 Thread paul j3
paul j3 added the comment: Let me highlight something about https://stackoverflow.com/a/15008806/169947 The original question was how to implement an Action that accepts 'True' or 'False' as an argument. Users often try `type=bool`, which doesn't work because of the normal behavior of the

[issue8538] Add FlagAction to argparse

2018-12-27 Thread Yaniv Aknin
Change by Yaniv Aknin : -- nosy: -Yaniv.Aknin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8538] Add FlagAction to argparse

2018-12-27 Thread Ken Williams
Ken Williams added the comment: @vstinner - I don't think that conclusion is correct, here is a very highly-upvoted answer on SO that indicates a lot of people are still looking for this: https://stackoverflow.com/a/15008806/169947 I myself asked a related (more focused?) question where I

[issue8538] Add FlagAction to argparse

2016-07-12 Thread STINNER Victor
STINNER Victor added the comment: I'm sorry but there is no activity since 4 years, so I guess that the feature is not common enough to require a builtin support in argparse. -- nosy: +haypo resolution: -> out of date status: open -> closed ___

[issue8538] Add FlagAction to argparse

2016-06-20 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue8538] Add FlagAction to argparse

2015-04-29 Thread Wolfgang Maier
Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de: -- nosy: +wolma ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8538 ___ ___

[issue8538] Add FlagAction to argparse

2012-07-22 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: On the off chance that someone was waiting for feedback from me, I'll say: (1) A simple boolean --foo/--no-foo action seems useful to me. I would probably call it BooleanOptionalAction rather than FlagAction. (Almost anything could be

[issue8538] Add FlagAction to argparse

2011-12-11 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berkerpeksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8538 ___ ___

[issue8538] Add FlagAction to argparse

2010-11-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I think FlagAction should implement strictly boolean options, that is --foo and --no-foo, without arguments at all. For ConfigureAction, there is a precedent (unless I’m mistaken) in configure, which permits such things: --without-unicode