Lichen

tests/fib.py

629:c45334be1ad6
2017-02-27 Paul Boddie Introduced a logical result that simplifies negation expressions when they are used directly by "if" statements.
     1 class fib:     2     def __init__(self):     3         self.a, self.b = 0, 1     4      5     def next(self):     6         result = self.b     7         self.a, self.b = self.b, self.a + self.b     8         return result     9     10 seq = fib()    11 i = 0    12 while i < 10:    13     print seq.next()    14     i += 1