<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Awesome, I missed that. Thank you Brett.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Am I understanding correctly that if I'd like to avoid `async with await EXPR` whatever is returned from EXPR must implement `__await__` as a non-coroutine method? Which then I'd just be able to use `async with ...`? </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-06 16:05 GMT-06:00 Brett Cannon <span dir="ltr"><<a href="mailto:brett@python.org" target="_blank">brett@python.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span class=""><div dir="ltr">On Sat, 6 Feb 2016 at 13:50 Daniel Miller <<a href="mailto:dalanmiller@rethinkdb.com" target="_blank">dalanmiller@rethinkdb.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi Python-Dev Group,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I am trying to implement __aenter__ and __aexit__ for the <a href="https://rethinkdb.com" target="_blank">RethinkDB</a> Python driver. Looking at the PEP I don't see any definitions as to what the expected parameters that __exit__ are supposed to take and couldn't find any other similar implementations. Is there a piece of documentation I should be looking at that I'm missing? </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default"><font face="tahoma, sans-serif"><a href="https://www.python.org/dev/peps/pep-0492/#asynchronous-context-managers-and-async-with" target="_blank">https://www.python.org/dev/peps/pep-0492/#asynchronous-context-managers-and-async-with</a></font></div></div></blockquote><div><br></div></span><div>The arguments to __aexit__ are the same as __exit__ in a normal context manager. See <a href="https://docs.python.org/3.5/reference/datamodel.html#object.__aexit__" target="_blank">https://docs.python.org/3.5/reference/datamodel.html#object.__aexit__</a> for the official docs for __aexit__. </div></div></div>
</blockquote></div><br></div>