3 ms·
What drives me nuts about doing JS is that the browser execution model seems vague. In python, I can have the if __name__=='__main__': main() at the end if a
by smitty1e 7y ago
What drives me nuts about doing JS is that the browser execution model seems vague.
In python, I can have the
if __name__=='__main__': main()
at the end if a script, and easily import the script's functions into
- pytest for testing
- some other module for larger modules
- into a cli.py file to slap a Click interface on it.
What a great blend of flexibility while retaining coherence.