Skip to content

Commit da1d1cc

Browse files
committed
Fix comments
1 parent 7a738ae commit da1d1cc

File tree

1 file changed

+6
-6
lines changed
  • implement-shell-tools/wc

1 file changed

+6
-6
lines changed

implement-shell-tools/wc/wc.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
def main():
77
# --------------------------------------------------------
8-
# 1. Set up argparse
8+
# Set up argparse
99
# --------------------------------------------------------
1010
parser= argparse.ArgumentParser(
1111
prog="wc",
@@ -21,7 +21,7 @@ def main():
2121
args = parser.parse_args()
2222

2323
# --------------------------------------------------------
24-
# 2. Ensures at least one path exists
24+
# Ensures at least one path exists
2525
# --------------------------------------------------------
2626
if len(args.paths) == 0:
2727
print("wc: no file specified", file=sys.stderr)
@@ -30,7 +30,7 @@ def main():
3030
totals= {"lines": 0, "words": 0, "chars": 0}
3131

3232
# --------------------------------------------------------
33-
# 3. Loop over each file path and process it
33+
# Loop over each file path and process it
3434
# --------------------------------------------------------
3535
for file_path in args.paths:
3636
try:
@@ -41,7 +41,7 @@ def main():
4141
continue
4242

4343
# --------------------------------------------------------
44-
# 4. Count values
44+
# Count values
4545
# --------------------------------------------------------
4646
line_count = len(content.split("\n"))
4747

@@ -55,7 +55,7 @@ def main():
5555
totals["chars"] +=char_count
5656

5757
# --------------------------------------------------------
58-
# 5. Decide what to print based on flags
58+
# Decide what to print based on flags
5959
# --------------------------------------------------------
6060
no_flags = not args.l and not args.w and not args.c
6161

@@ -74,7 +74,7 @@ def main():
7474

7575

7676
# --------------------------------------------------------
77-
# 6. Print totals if there are multiple files
77+
# Print totals if there are multiple files
7878
# --------------------------------------------------------
7979
if len(args.paths) > 1:
8080
no_flags = not args.l and not args.w and not args.c

0 commit comments

Comments
 (0)