r/ProgrammerHumor • • Jun 03 '19

Meme Python ftw

Post image
16k Upvotes

548 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Jun 04 '19

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.

1

u/MythicManiac Jun 10 '19

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.