What does if __name__ == "__main__": do? has half a million views and some excellent answers.
Unfortunately, while the question title asks one (clear, good) question, the question body asks two completely different questions: what if __name__ == "__main__":
does (the question in the title), and what *args
means in a function definition. The OP has exhibited a program that happens to use both of these constructs, but there is no actual connection between them.
As a result, while most answers (including the accepted one) address only the primary question and don't acknowledge the secondary question's existence, some people have posted answers that respond to the secondary question. This has caused confusion, and it seems very unlikely that anybody seeking an answer to the second question would even find the page in the first place given that the title indicates it is about a completely different question.
The references to the secondary question are just noise, and I'd like a mod to clean them up. If a mod were to do all of the following things...
- Edit "Also, what does
*args
mean in this example?" out of the question - Delete https://stackoverflow.com/a/419192/1709587, which only addresses the secondary question
- Edit out the second half of https://stackoverflow.com/a/419174/1709587, which addresses the secondary question
- Delete https://stackoverflow.com/a/420010/1709587, which only addresses the secondary question
- Edit out the disclaimer from https://stackoverflow.com/a/20158605/1709587 that it is only answering the 'primary' question
- Delete my comment about the mess
... then all trace of there ever having been a secondary question would be purged! Given that nobody looking for an answer to the secondary question on Google is ever going to find that page, I reckon this would be a straightforwardly good thing; it's just removing irrelevant noise.
But I realise this might be a controversial thing to ask for, because:
- I'm asking for the question's meaning to be changed (or at least for it to be reduced in scope) by an editor
- I'm asking for the deletion of highly upvoted posts
Would it be right for a mod to take the actions I'm suggesting here?