3 ms·
> a function taking a single argument usually does not need that argument to be named Would you rather have: thread_pool.shutdown(True) or thread_pool.shutd
by ehsankia 8y ago
> a function taking a single argument usually does not need that argument to be named
Would you rather have:
thread_pool.shutdown(True)
or
thread_pool.shutdown(wait=True)
Even with single argument, it's not always clear what the argument means from the function name, so being explicit makes the code more readable.
EDIT: I realize you said "usually", but my point still stands.
- totalperspectiv 8y agoYou can maintain clarity with your positional arguments with just: wait = True thread_pool.shutdown(wait)
- polotics 8y agoI am sorry but this looks too much like Java to me.