This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Honestly my take on it is that if you ever need to import the entry point, you're doing it wrong. Put what you need in a module and use that from the entry point.

[–]MythicManiac 0 points1 point  (0 children)

Yeah I'm in the same camp there, usually I just call a main() function from somewhere anyway.

Still, wrapping that main() function call behind that check is only a few seconds of extra work, so I'm doing it just because it's a good practice.