@asyncio.coroutine
def factorial(number):
    f = 1
    for i in range(2, (number + 1)):
        print(('Asyncio.Task: Compute factorial(%s)' % i))
        (yield from asyncio.sleep(1))
        f *= i
    print(('Asyncio.Task - factorial(%s) = %s' % (number, f)))
@asyncio.coroutine
def factorial(number):
    f = 1
    for i in range(2, (number + 1)):
        print(('Asyncio.Task: Compute factorial(%s)' % i))
        (yield from asyncio.sleep(1))
        f *= i
    print(('Asyncio.Task - factorial(%s) = %s' % (number, f)))