Skip to content

Commit 894bd45

Browse files
committed
added default attrib
1 parent 05d442b commit 894bd45

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎example/argparse/usage.py‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@
1515

1616
def parse_options():
1717
"""
18-
Parse all command line options and arguments.
19-
20-
Return them as a dictionary.
18+
Parse all command line options and arguments and return them as a dictionary.
2119
"""
2220
parser = argparse.ArgumentParser()
2321
group = parser.add_mutually_exclusive_group()
2422

25-
group.add_argument("-v", "--verbose", dest="verbose", help="increase output verbosity", action="store_true")
26-
group.add_argument("-s", "--silent", dest="silent", help="decrease output verbosity", action="store_true")
23+
group.add_argument("-v", "--verbose", dest="verbose", default="False", help="increase output verbosity", action="store_true")
24+
group.add_argument("-s", "--silent", dest="silent", default="False", help="decrease output verbosity", action="store_true")
2725

2826
parser.add_argument("-V", "--version", action="version", version=VERSION)
2927

0 commit comments

Comments
 (0)