Skip to content

Passed argument argv unused #23

@kaushiksk

Description

@kaushiksk

cmd.Parse (sys.argv)

In the example, the main function takes an argument argv, to which sys.argv is passed during runtime. However the argv variable is never used in the program and the cmd.Parse is again supplied with sys.argv itself.

I feel this would be confusing to a user reading the code.

Suggestions:

  1. Remove the argv option from main. import sys globally on top. Call cmd.Parse with sys.argv.
  2. Call cmd.Parse with argv.

I feel Option 2 would make the program much more readable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions