Wrapping my head around generators
You could just implement the infinite generator, and use itertools.takewhile to limit it:

&gt;&gt;&gt; list(itertools.takewhile(lambda x : x &lt; 8, fibonacci_inf(0,1)))
[1, 1, 2, 3, 5]