continued fraction of golden ratio,
(1+sqrt(5))/2 = (1+(1/(1+1/(1+1/....))))
http://upload.wikimedia.org/math/4/c/4/4c453149032c9c6840e8ae814df707cd.png

If I explain the return types of the method,
[1] If the continued fraction is a finite continued fraction the method will return a single list.
eg: >>> continued_fraction(4,3,0)
      [1, 3] 
[2] If the continued fraction is an infinite continued fraction the method will return a list containing two lists. The first nested list will be the non-recurring part and the second list will be the recurring part of the continued fraction.

In the above example(golden ratio) the continued fraction expansion will be (1;1,1,1,1,1,........). In this special case somehow the non recurring part is equal to the recurring part.