I came across a line in python:
def somefunc:
    [...]
if __name__ == '__main__':
    somefunc
I don't understand what the "if __name ..." does.
Suppose we have:
if __name__ == '__main__': main()
#this code will find main
So is this similar to the main() function in C/C++, which gets executed before any other function?
 
    