Skip to content

Instantly share code, notes, and snippets.

@gknapp
Last active August 29, 2015 14:12
Show Gist options
  • Save gknapp/979cfaaa43d45a886597 to your computer and use it in GitHub Desktop.
Save gknapp/979cfaaa43d45a886597 to your computer and use it in GitHub Desktop.
Instantiate with constructor args
(import argparse)
(defn my-func
[]
(let [[desc "My App"]
[parser ((. argparse ArgumentParser) :description desc)]]
(. parser parse-args)))
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