Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6146e8a

Browse files
committed
a little cleaning
1 parent74e3dbd commit6146e8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎examples/commandline/argparse_example.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python3
22

33
# to get usage: use -h
4-
importsys
54
importargparse
65

76

@@ -23,10 +22,12 @@
2322

2423
args=parser.parse_args()
2524

26-
ifargs.a:print("-a set")
25+
ifargs.a:
26+
print("-a set")
2727
print("-b = {}".format(args.b))
2828
print("-c = {}".format(args.c))
29-
ifargs.darg:print("--dargs set")
29+
ifargs.darg:
30+
print("--dargs set")
3031
print("--earg value = {}".format(args.earg))
3132

3233
print(" ")
@@ -39,4 +40,3 @@
3940
# want a dictionary view?
4041
dargs=vars(args)
4142
print(dargs)
42-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp