We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Falk: Useful code snippets from Kawan's run_plot_precipitation_all.py :
https://github.com/geodesymiami/Precip_cron/blob/9ca7d19f937e7dce45b548a8cd61ebe832690fe3/run_plot_precipitation_all.py#L13-L16
https://github.com/geodesymiami/Precip_cron/blob/9ca7d19f937e7dce45b548a8cd61ebe832690fe3/run_plot_precipitation_all.py#L44-L47
https://github.com/geodesymiami/Precip_cron/blob/9ca7d19f937e7dce45b548a8cd61ebe832690fe3/run_plot_precipitation_all.py#L88
Kawan: Regarding the last point, there are two ways to initialize an argparse.Namespace.
The way I did it in run_plot_precip… is:
inps = argparse.Namespace(style=style, name=[volcano], no_show=True)
import argparse kwargs = {'key':'value', 'hello':'world', 'im_not': 'paid_enough’}
argparse.Namespace(** kwargs) Namespace(key='value', hello='world', im_not='paid_enough’)
argparse.Namespace(key='value', hello='world', im_not='paid_enough') Namespace(key='value', hello='world', im_not='paid_enough’)
But result is the same object. But passing **kwargs is great when you have a lot of key word arguments or want to pass things dynamically.
This is also the case for (or any other object with a similar init method).
https://github.com/python/cpython/blob/e8c91d90ba8fab410a27fad4f709cc73f6ffcbf4/Lib/argparse.py#L1295-L1297
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Falk:
Useful code snippets from Kawan's run_plot_precipitation_all.py :
https://github.com/geodesymiami/Precip_cron/blob/9ca7d19f937e7dce45b548a8cd61ebe832690fe3/run_plot_precipitation_all.py#L13-L16
https://github.com/geodesymiami/Precip_cron/blob/9ca7d19f937e7dce45b548a8cd61ebe832690fe3/run_plot_precipitation_all.py#L44-L47
https://github.com/geodesymiami/Precip_cron/blob/9ca7d19f937e7dce45b548a8cd61ebe832690fe3/run_plot_precipitation_all.py#L88
Kawan:
Regarding the last point, there are two ways to initialize an argparse.Namespace.
The way I did it in run_plot_precip… is:
option 1
option 2
But result is the same object. But passing **kwargs is great when you have a lot of key word arguments or want to pass things dynamically.
This is also the case for (or any other object with a similar init method).
https://github.com/python/cpython/blob/e8c91d90ba8fab410a27fad4f709cc73f6ffcbf4/Lib/argparse.py#L1295-L1297
The text was updated successfully, but these errors were encountered: