Skip to content
This repository was archived by the owner on Feb 14, 2018. It is now read-only.
This repository was archived by the owner on Feb 14, 2018. It is now read-only.

Make blocks callable #4

Description

@ixjlyons

In some cases, it would be better to simply treat blocks as if they were functions. Many blocks really should just be functions anyway, since they don't need to carry state. This would also make CallablePipelineBlock totally unnecessary.

A simple solution would be to just add this to PipelineBlock:

def __call__(self, *args, **kwargs):
    return self.process(*args, **kwargs)

A better solution would probably be to just get rid of the process method altogether.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions