News for hackers. Stuff that matters.
Re:Tools I use: argparse builder by dpc_pw on Thursday October 08, 2020 @12:12PM (#24720511)
Bleh. When you need a in-browser tool to use a library, you really know it's messed up.

Isn't there anything like structopt https://docs.rs/structopt/0.3.19/structopt/ for Python?

Re:Tools I use: argparse builder by metalliqaz on Thursday October 08, 2020 @12:17PM (#24720570)
Looking at that link, argparse is very similar to structopt. It just uses the syntax and idioms of a different language. The structopt attributes appear to be approx. the same complexity as argparse functions.
Re:Tools I use: argparse builder by mypalmike on Thursday October 08, 2020 @12:41PM (#24720863)
Indeed. My guess would be that structopt's design was based on Python's argparse, which itself derived from lessons learned from the earlier Python module optparse, which was created around 20 years ago. I'm not sure where declarative CLI argument parsing originated, but I first encountered it in optparse.
Re:Tools I use: argparse builder by m45t3r on Thursday October 08, 2020 @12:19PM (#24720592)
There are multiple alternatives for argparse if you look for third-party libraries.

The thing that makes argparse particularly useful is because it is in stdlib, so if you use you can create a Python script without external dependencies.