You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Autowrap of a python function of variable args (such as min) will create a processor with 1 inlet. That's fine. Sending it an iterable should apply the function to the args. But it doesn't:
[(3,4,5)(
|
[min]
|
[print]
Should print 3, but instead:
Error: <mfp.builtins.var.Message object at 0x7ffd58970750>
Traceback (most recent call last):
File "/home/grib/devel/mfp/wafbuild/virtual/local/lib/python2.7/dist-packages/mfp-0.05_git_05c941b-py2.7.egg/mfp/processor.py", line 545, in send
work[:1] = w_target._send(w_val, w_inlet)
File "/home/grib/devel/mfp/wafbuild/virtual/local/lib/python2.7/dist-packages/mfp-0.05_git_05c941b-py2.7.egg/mfp/processor.py", line 568, in _send
self.trigger()
File "/home/grib/devel/mfp/wafbuild/virtual/local/lib/python2.7/dist-packages/mfp-0.05_git_05c941b-py2.7.egg/mfp/builtins/pyfunc.py", line 207, in trigger
self.outlets[0] = self.thunk(*args)
TypeError: min expected 1 arguments, got 0
The text was updated successfully, but these errors were encountered:
The above commit wraps variable-arity or unknown-arity Python functions as processors with one inlet. A sequence sent to that inlet is unpacked and applied to the thunk. So this works as expected:
Autowrap of a python function of variable args (such as
min
) will create a processor with 1 inlet. That's fine. Sending it an iterable should apply the function to the args. But it doesn't:Should print 3, but instead:
The text was updated successfully, but these errors were encountered: