This is good practice. First, it clearly marks your module entry point (assuming you don't have any other executable code at toplevel - yuck). Second, it makes your module importable by other modules without executing, which some tools like code checkers, packagers etc. need to do.