Lichen

tests/range.py

303:c07a749f5bd0
2016-12-02 Paul Boddie Use __data__ attributes with native functions apart from when __data__ needs replacing (such as in the list append and concatenation functions).
     1 l = range(0, 10)     2 print l                     # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]     3 print len(l)                # 10     4      5 x = xrange(0, -10, -2)     6 print x                     # __builtins__.span.xrange(0, -10, -2)     7 print len(x)                # 5     8      9 for i in x:    10     print i                 # 0    11                             # -2    12                             # -4    13                             # -6    14                             # -8    15     16 x = xrange(0, -10, 2)    17 print x                     # __builtins__.span.xrange(0, 0, 2)    18 print len(x)                # 0