Python iterators, asynchronous context managers

0

I am studying the asyncio module and there are some implementations of some other services that I understand but I got caught up in some doubts, which would be asynchronous iterators and context managers.

I've seen codes like this:

async def fetch(url):
  async with aiohttp.ClientSession() as session:
    async with session.get(url) as response:
      return await response.json()

Here is the link to the question I asked:

Error in requests with aiohttp in asyncio

How is behind the rags the workings of the same ??

    
asked by anonymous 15.04.2018 / 08:50

0 answers