update swig on windows
This commit is contained in:
16
winx64/bin/swigwin-4.0.0/Examples/python/functor/runme.py
Normal file
16
winx64/bin/swigwin-4.0.0/Examples/python/functor/runme.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Operator overloading example
|
||||
import example
|
||||
import math
|
||||
|
||||
a = example.intSum(0)
|
||||
b = example.doubleSum(100.0)
|
||||
|
||||
# Use the objects. They should be callable just like a normal
|
||||
# python function.
|
||||
|
||||
for i in range(0, 100):
|
||||
a(i) # Note: function call
|
||||
b(math.sqrt(i)) # Note: function call
|
||||
|
||||
print a.result()
|
||||
print b.result()
|
||||
Reference in New Issue
Block a user