~4 min by voice
The interviewer wants to see whether you understand the context manager protocol at the level of mechanics: when and with what arguments __exit__ is called, how exception suppression works, and why the generator version via contextmanager doesn't release the resource on an error without try/finally.
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.
Sign in to answerBest with headphones · ~4 min