@coro
def somadora():
    qt_parcelas = 0
    total = 0
    try:
        while True:
            parcela = yield
            qt_parcelas += 1
            total += parcela

            print('parcelas: %d  total: %d' % (qt_parcelas, total))
    finally:
        print('parcelas: %d  total: %d  media: %d' % (qt_parcelas, total, qt_parcelas/total))
dataset/ETHPy150Open fluentpython/example-code/attic/control/adder/soma_deco.py/somadora/swapped operands of `/`