4 ms·
One question I asked recently was "what is the `with` statement in Python for?" If they ask for clarification I'll mention related terms like "context managemen
by pphysch 3y ago
One question I asked recently was "what is the `with` statement in Python for?" If they ask for clarification I'll mention related terms like "context management" and "RAII", which we could discuss without Python syntax.
Yes, they can Google the answer in 3s.
Yes, I could also ask a long-form question about how they would approach wrapping an IO interface in Python.
But if they don't understand `with` or resource/context management, the chances that they would produce a reasonable answer to the long-form question are tiny. They will produce an answer anyways, and it will likely be a waste of time. So we cut to the chase and target the core concepts directly.