# When is a question considered too hypothetical / lacking context?

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)?

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