<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Jul 5, 2016 at 10:31 PM Nick Coghlan <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It does occur to me that it might be worth customising the error<br>
reported, though - it's currently genuinely non-obvious why they don't<br>
implement the protocol, but it might be clearer if the error was<br>
"TypeError: generator requires 'contextlib.contextmanager' or<br>
'contextlib.closing' to support context management"<br></blockquote><div><br></div><div>+1 for error messages that explain how to solve the problemĀ </div></div></div>