Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert scheduler.py to use argparse #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Convert scheduler.py to use argparse #4

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 3, 2013

Thus removing non-standard-library docopt dependency.

Thus removing non-standard-library docopt dependency.
@prophile
Copy link
Owner

prophile commented Apr 3, 2013

Why is the docopt dependency a problem?

@ghost
Copy link
Author

ghost commented Apr 3, 2013

Why use docopt when you can use argparse?

@ghost
Copy link
Author

ghost commented Apr 3, 2013

(argparse does type checking and management of mutually-exclusive arguments for you)

@prophile
Copy link
Owner

prophile commented Apr 3, 2013

Likewise: why use argparse when you can use docopt? It's simpler, less code, and easier to modify.

@ghost
Copy link
Author

ghost commented Apr 3, 2013

Ok, if you want to keep docopt, keep docopt.

But IMO, this:

match_count = args.matches

is better than this:

match_count = int(options['<matches>'])

and using something from the standard library that's fit-for-purpose is better than an external dependency.

@prophile
Copy link
Owner

prophile commented Apr 3, 2013

You do raise a good point on not having to do the conversions manually.

I'm not sure I entirely agree with the argument that anything is better purely by dint of its being in the standard library, particularly with proper dependency management.

I'm not averse to merging this in principle - anyone else feel strongly one way or the other?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant