changeset 29:f91ef7d7615b

Use store_true feature of argparse.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 25 May 2021 12:39:04 +0300
parents 3442b8700da7
children 34755af2ea1f
files lxmldump.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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",