Lichen

tests/operators.py

294:79c82d827bbe
2016-12-01 Paul Boddie Fixed the xrange implementation, removing incorrect NO_END interpretation, adding start and end validation, adding string representations. Moved range from the iterable module to the span module. Added a test of ranges.
     1 import operator     2      3 def f(a, op, b):     4     return op(a, b)     5      6 print f(1, operator.add, 2) # 3     7 print f(1, operator.sub, 2) # -1