On 28/05/2020 21:05, email@example.com wrote:
People write main entry points that are not exactly this?
If __name__ == '__main__': sys.exit(main(sys.argv[1:]))
Mostly I don't write main entry points at all. If I do the dance, it's more likely to be:
if __name__ == '__main__': test_this_module_to_destruction()
...though personally I prefer separate scripts for testing. For the main program, I'm generally using argparse so there's no need to mess with sys.argv directly, and why on earth would I add complexity and indentation with an entirely unnecessary function wrapper?