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.

Reply via email to