HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 4 days agoPython needs an actual default functionimagemessage-square160linkfedilinkarrow-up1745arrow-down129file-text
arrow-up1716arrow-down1imagePython needs an actual default functionHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 4 days agomessage-square160linkfedilinkfile-text
Also, do y’all call main() in the if block or do you just put the code you want to run in the if block?
minus-squarejjjalljs@ttrpg.networklinkfedilinkarrow-up8·4 days agoCall the function from the if block. Now your tests can more easily call it. I think at my last job we did argument parsing in the if block, and passed stuff into the main function.
Call the function from the if block.
Now your tests can more easily call it.
I think at my last job we did argument parsing in the if block, and passed stuff into the main function.