PyEuler

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Mon Feb 25 17:52:06 EST 2008


Arnaud Delobelle:
> In this case why not:
>
> def xfib(a=1, b=1):
>     while True:
>         yield a
>         a += b
>         yield b
>         b += a

That's a bit less easy to understand than my version, for me.
In my version is easy to see the values of the variables. And using a
longer function name is better.

Bye,
bearophile



More information about the Python-list mailing list