August 7, 2018 at 10:49 pm
Comments posted to this topic are about the item Detecting the script
August 7, 2018 at 10:51 pm
Interesting question, thanks, Steve
Learned something.
just wondering where one would use this.
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
August 8, 2018 at 9:23 am
You use this to ensure a module can be run standalone or imported. If I import this, this code doesn't run
if __name__ == __main__:
Dothing()
However, if I had a function above this, I could still call it. It's a great trick for test/debugging a function. Put something in this call to test your specific case.
August 8, 2018 at 10:09 am
I guessed... wrong!
Haha, learned something.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply