Python 3.5: “async with” results in SyntaxError. Why? [duplicate]
问题 This question already has an answer here : How to use Asynchronous Comprehensions? (1 answer) Closed 2 years ago . I am using Python 3.5, which, according to PEP 492 should have access to the async with syntax, yet I get a SyntaxError when I try to use it. What am I doing wrong? In [14]: sys.version Out[14]: '3.5.2 (default, Oct 11 2016, 04:59:56) \n[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)]' In [15]: async with aiohttp.ClientSession() as session: File "<ipython-input-15