Lichen

tests/fib.py

583:aed28d04304d
2017-02-13 Paul Boddie Re-added size information to string instances as the __size__ attribute. This fixes problems introduced when using strlen on data likely to contain embedded nulls, which was the reason for having size information explicitly stored in the first place. attr-strvalue-without-size
     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