3 ms·
So the author wants a configuration, where I can either run the program with --foo-timeout=5 --bar-timeout=10 or with --no-timeouts which disables the timeo
by xg15 1y ago
So the author wants a configuration, where I can either run the program with
--foo-timeout=5 --bar-timeout=10
or with
--no-timeouts
which disables the timeouts for both too and bar.
I don't know the author's entire usecase, but it seems odd that you would specifically NOT want the user to only disable one timeout, but keep all the others active.
Unless there is a real reason for this, the more logical design for me would be to treat --foo-timeout=0 or something as the setting to disable timeout foo.
Not sure if argparse supports aliases, but if it does, --no-timeouts could then be defined as an alias for "--foo-timeout=0 --bar-timeout=0 --baz-timeout=0" etc etc.
- NoahZuniga 1y agoThey probably mean a combination like: I want the program to time out if the server response isn't done after 60 seconds I want the program to time out if the the last byte from the server is more than 10 seconds ago. It doesn't make sense to say I want one of these timeouts and --no-timeout