5 ms·
Which, except for optparse, was all on the front page yesterday. So optparse is deprecated. More work I guess apart from auditing extensions for threading. Lif
by cvnmalk 3y ago
Which, except for optparse, was all on the front page yesterday. So optparse is deprecated. More work I guess apart from auditing extensions for threading.
Life is great in the Python treadmill.
- maxnoe 3y agoIIRC, optparse was going to be be removed in 3.5(?) but outcry was large . It has a depreciation warning in the docs since 3.2. It was in the "please just use argparse instead" state for a long time, this "just" adds an actual code warning.
- nickcw 3y agoI've tried to love argparse but it is so complicated. I always have to read the docs each time I use it. getopt has its own brutal simplicity.
- moonshinefe 3y agoIf you aren't averse to using a third party package, on my personal projects I always found https://github.com/docopt/docopt https://github.com/docopt/docopt to be nice. You can kill 2 birds with one stone by documenting your scripts while also providing the argument structure / parsing.
- kzrdude 3y agoI think argparse works fine. What worries me is that it's also "soft-deprecated", because devs have said it should get no further development. I hope it stays around, because I use it by default as a no-dependencies solution that I know how it works.
- mardifoufs 3y agoWait.. source? If argparse isn't getting more development, what's the current alternative?
- deleted 3y ago[deleted]
- kzrdude 3y agoHere it is https://discuss.python.org/t/argparser-subcommands-function-as-a-feature-not-a-workaround/30207/2 https://discuss.python.org/t/argparser-subcommands-function-... feature frozen doesn't sound so bad. It just risks sliding into "we don't want to maintain it because it has known problems". (My opinion: Everything well used has known problems, it's ok.)
- silon42 3y agoJust last week I had to parse arguments again after a long time in a script of mine. After some googling, getopt was chosen due to it's simplicity.