Lichen

tests/operators.py

1034:2df62f615d0c
5 months ago Paul Boddie Avoid creating zero-length temporary arrays. value-replacement
     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