param.reactive.reactive_ops.downstream#

reactive_ops.downstream() → Iterator[rx][source]#

Iterate over the rx nodes that derive their value from this expression, directly or transitively, excluding itself. The reverse of upstream(), but not a perfect mirror of its scope: a node that installed this expression as its .rx.overrides replacement is included, same as upstream(), but a node that only reaches this one through bind(), .rx.when, .rx.where, or a Parameter(allow_refs=True) is not. The owning Parameterized keeps a ref’d expression alive on its own, so it is deliberately excluded from the reader bookkeeping this method (and dispose()’s cascade) relies on.

Readers are held weakly, so this reflects only what is currently alive, and traversal order is unspecified. As with upstream(), use set(downstream()) rather than in on the iterator directly.

Returns:

Empty if the .rx namespace does not belong to an rx node, or if nothing currently reads from it.

Return type:

Iterator[rx]

Examples

>>> import param
>>> a = param.rx(1)
>>> b = a.rx.pipe(lambda x: x + 1)
>>> b in set(a.rx.downstream())
True