Last active
August 29, 2015 14:12
-
-
Save gknapp/979cfaaa43d45a886597 to your computer and use it in GitHub Desktop.
Instantiate with constructor args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import argparse) | |
(defn my-func | |
[] | |
(let [[desc "My App"] | |
[parser ((. argparse ArgumentParser) :description desc)]] | |
(. parser parse-args))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_func(): | |
parser = argparse.ArgumentParser(description='My app') | |
return parser.parse_args() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment