HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 1 month agoPython needs an actual default functionlemmy.mlimagemessage-square159fedilinkarrow-up1759arrow-down129file-text
arrow-up1730arrow-down1imagePython needs an actual default functionlemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 1 month agomessage-square159fedilinkfile-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-squareEager Eagle@lemmy.worldcakelinkfedilinkEnglisharrow-up35·1 month agoThe if block is still in the global scope, so writing the code in it is a great way to find yourself scratching your head with a weird bug 30 minutes later.
The
if
block is still in the global scope, so writing the code in it is a great way to find yourself scratching your head with a weird bug 30 minutes later.