Thanks a lot! El vie., 8 nov. 2019 a las 12:30, Gustavo Carneiro (<[email protected]>) escribió: > > Yes, this is called "async generator", see > https://www.python.org/dev/peps/pep-0525/ > > On Fri, 8 Nov 2019 at 11:21, cr0hn <[email protected]> wrote: >> >> Hello everybody: >> >> I'm trying to write a Python code that mixing coroutines and >> generator, but I don't know if this make sense. Here the example: >> >> async def load_previous_data(redis: aioredis.Redis, >> channel: str, >> count: int = 20): >> >> result = await redis.xrange(channel, count=count, stop="+") >> >> key, values_raw = result[0] >> >> for k, v in values_raw.items(): >> yield k.decode("UTF-8"): v.decode("UTF-8") >> >> >> Could anybody help me? >> >> Thanks in advance >> >> >> -- >> Daniel García a.k.a. cr0hn - Security researcher and pentester >> @ggdaniel >> http://www.cr0hn.com/me/ >> >> -- >> You received this message because you are subscribed to the Google Groups >> "python-tulip" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python-tulip/CAO5w5vbAx0UO9SD2Uy9iWRBh7z8P%3DWRDBv53%3D_3vg_HzCVOQvw%40mail.gmail.com. > > > > -- > Gustavo J. A. M. Carneiro > Gambit Research > "The universe is always one step beyond logic." -- Frank Herbert
-- Daniel García a.k.a. cr0hn - Security researcher and pentester @ggdaniel http://www.cr0hn.com/me/ -- You received this message because you are subscribed to the Google Groups "python-tulip" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python-tulip/CAO5w5vYDTxUg0SdL%2BMsO_h8HeWLCgbsCv%3DZVqRA7VRDxy18kKw%40mail.gmail.com.
