Arnaud Delobelle: > I disagree; the generator function has no right to keep a and b to > itself. a and b cry out to be function parameters.
I see. Then that's a generator for a generalized Fibonacci sequence :-) Your version too is useful. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list