python-broqer
python-broqer copied to clipboard
Handle publishers in arguments for method calls
When doing a method call on a publisher, the arguments of this call have to be constant:
>>> v = Value('Hello World')
>>> v.split(sep=' ') | op.Sink(print)
['Hello', 'World']
It would be possible be digging into broqer.op.operator_overloading:_GetAttr
to allow publishers as argument values. When a publisher argument is emitting a new value, the method call should be re-evaluated.
>>> v = Value('Hello World')
>>> remove_str = Value('World')
>>> v.replace(remove_str, '') | op.Sink(print)
Hello
>>> remove_str.emit('Hello')
World