I'm currently implementing command line arguments in my python script and want to be as pythonic as possible. Thus I'm using argparse and am currently reading trough the documentations tutorial.
What's not clear to me, as I have def main():
def a_function():
and now have to add the argparse
related stuff somewhere, where does it go? Is there a PEP guideline?
I've assumed it goes outside the main()
, as the arguments are used in the function and the main, but then again it's nowhere mentioned.
Sorry I'm still learning and want to learn it correctly.
tl;dr. I'm a noob and don't know where to plac argparse
code