The reason I'm asking is because I recently encountered this question, and I can't make my mind up if it's off-topic here or not. I asked OP to include the imports so I could run the program, but because certain names (some_func(), save_dir, file_name, ...) were not defined, I gave up.

Even if those names were defined, a body for the except-clause is missing (which is a fatal error in Python). It kind of sounds like OP is asking for a review of the while-loop and its break conditions in general. Normally, that would be on-topic here, but I feel the question is missing too much context.

This help center article clearly states:

In order to give good advice, we need to see real, concrete code, and understand the context in which the code is used. Generic code (such as code containing placeholders like foo, MyClass, or doSomething()) leaves too much to the imagination.

(My emphasis).

Is the question off-topic? Why (not)?

  • 1
    \$\begingroup\$ I would say it's off-topic, and voted to close as lacking context. \$\endgroup\$
    – Phrancis
    Apr 23, 2018 at 19:33
  • \$\begingroup\$ are you saying that it is not runnable code? \$\endgroup\$
    – Malachi Mod
    Apr 23, 2018 at 19:45
  • 1
    \$\begingroup\$ @Malachi Exactly. Nobody can run the code if that much context is missing. \$\endgroup\$
    – Daniel
    Apr 23, 2018 at 19:51

1 Answer 1


With this question, there is not enough information in the code to see how it behaves and there is not enough context to fill in the blanks.

There is too much missing from the code for anyone to give a reasonable review, so I have closed the question with the following reason:

"Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site."

Please reference the following link for more information: https://codereview.meta.stackexchange.com/a/3652


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .