Skip to content

London | 26-JUL-SDC | Ping Wang | Sprint 4 | Implement-shell-tools - #634

Open
pathywang wants to merge 9 commits into
CodeYourFuture:mainfrom
pathywang:python-shell-tools
Open

London | 26-JUL-SDC | Ping Wang | Sprint 4 | Implement-shell-tools#634
pathywang wants to merge 9 commits into
CodeYourFuture:mainfrom
pathywang:python-shell-tools

Conversation

@pathywang

@pathywang pathywang commented Jul 29, 2026

Copy link
Copy Markdown
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

As usual, i did prep then made branch from main, create new file and did coursework with python language which is mirrored the same task with JavaScript language, still hard with AI explanatio and require lots of memorization and review

Task ID: CYF-1152

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@pathywang pathywang changed the title London | 26-JUL-SDC | Sprint 4 | Implement-shell-tools London | 26-JUL-SDC | Ping Wang | Sprint 4 | Implement-shell-tools Jul 29, 2026
@pathywang pathywang added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 29, 2026
@pathywang pathywang added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 1, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start, but some things to fix.

also, Is the choice you have used for processing arguments the most effective? Is there a library you could use to help the implementation?

Comment thread implement-shell-tools/wc/wc.py Outdated
output = []

if count_lines:
output.append(str(lines))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you run this with multiple files, how does the output look? What change could make it neater?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the colums do not line up very well because the numbers have different length so i formatted the string with fixted length 8.

Comment thread implement-shell-tools/wc/wc.py Outdated

if len(files) > 1:
output = []

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about the output code here? Can you spot any duplication across the file?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes there are nearly two identical codes so i define print_out function then call twice later on, refactor code

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 3, 2026
@pathywang

Copy link
Copy Markdown
Author

i manually use sys.agrv instead of import argparse from librares, i noticed it then i would use import argparse later on which should be better. thanks

@pathywang pathywang added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants