HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 13 天前Python needs an actual default functionlemmy.mlimagemessage-square160linkfedilinkarrow-up1758arrow-down129file-text
arrow-up1729arrow-down1imagePython needs an actual default functionlemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 13 天前message-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-squareIronKrill@lemmy.calinkfedilinkarrow-up12·12 天前And scope. Variables declared in the if can be read everywhere, variables declared in the function are limited to that function.
And scope. Variables declared in the if can be read everywhere, variables declared in the function are limited to that function.