# HG changeset patch # User Matti Hamalainen # Date 1621935544 -10800 # Node ID f91ef7d7615bd226bc79f3d9d713faf1231ffc68 # Parent 3442b8700da734fda715569849dc9cab9387d9ed Use store_true feature of argparse. diff -r 3442b8700da7 -r f91ef7d7615b lxmldump.py --- a/lxmldump.py Tue May 25 11:42:44 2021 +0300 +++ b/lxmldump.py Tue May 25 12:39:04 2021 +0300 @@ -248,16 +248,17 @@ optparser.add_argument("-n", "--normalize", dest="normalize", - action="store_const", const=True, default=False, + action="store_true", help="output NFC normalized Unicode") optparser.add_argument("-a", "--annotate", dest="annotate", - action="store_const", const=True, default=False, + action="store_true", help="annotate strings") optparser.add_argument("-p", "--debug", - dest="debug", action="store_const", const=True, default=False, + dest="debug", + action="store_true", help=argparse.SUPPRESS) optparser.add_argument("-i", "--indent",