5 ms·
Look up option parsing libraries (not sure what the state of the art is in python at the moment). Options shouldn't be order dependant like that. Have you got
by benj111 8y ago
Look up option parsing libraries (not sure what the state of the art is in python at the moment).
Options shouldn't be order dependant like that.
Have you got any comparisons to other algorithms
- zelon88 8y agoI cringe everytime I look at that code block. I eventually want to put that code into a loop. That will probably come at the same time as relative path support. Just know that I'm not proud of argument handling in its current form and improvements are on my radar.
- benj111 8y agoYes I thought it was an interesting code block :) Good on you for releasing it though. I would seriously look at using a library rather than rolling your own. Sorting all the edge cases is a pain, they can automate help messages etc, gnu style long options etc. Unless of course you want to delve into the weeds of option parsing.
- WorldMaker 8y agoSince Python 3.2 argparse has been in the Python Standard Library: https://docs.python.org/3/library/argparse.html https://docs.python.org/3/library/argparse.html