Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  > Use a command-line argument parsing library where you can.
  > ...
  >    Python: Click, Typer
What's the problem with using the python standard library argparse?

I would frown upon adding a dependency for such a core feature as argument parsing, unless it brings strong benefits. And even then, I'd recommend to use the standard lib and to switch to the other libs only when necessary.



argparse is really good and it's built-in. I was also wondering why it wasn't listed as the default option for Python, let alone it not being mentioned at all.


I'd use click over argparse for the same reason I prefer the requests lib over built-ins for standard network communication: it smoothes out the rough edges, cuts down on boilerplate and makes the code easier to read, write and maintain.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: