Thanks to visit codestin.com
Credit goes to github.com

Skip to content

stream.Pipe memoize option unused? #6653

@SimonHeybrock

Description

@SimonHeybrock

Is was trying to understand what the memoize option to holoviews.streams.Pipe does, but contrary to what the docstring says this option seems unused (unless the is some metaclass magic that I cannot see):

class Pipe(Stream):
"""A Stream used to pipe arbitrary data to a callback.
Unlike other streams memoization can be disabled for a
Pipe stream (and is disabled by default).
"""
data = param.Parameter(default=None, constant=True, doc="""
Arbitrary data being streamed to a DynamicMap callback.""")
def __init__(self, data=None, memoize=False, **params):
super().__init__(data=data, **params)
self._memoize_counter = 0
def send(self, data):
"""A convenience method to send an event with data without
supplying a keyword.
"""
self.event(data=data)
def _on_trigger(self):
self._memoize_counter += 1
@property
def hashkey(self):
return {'_memoize_key': self._memoize_counter}

Is this intentional or a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    TRIAGENeeds triaging

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions