Skip to content

Handle publishers in arguments for method calls #19

@semiversus

Description

@semiversus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions