Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Pipe():
- def build_pipeline(self):
- Stage1 = Object_X()
- Stage2 = Object_Y()
- self.pipeline = [Stage1, Stage2]
- def run():
- for p in pipeline:
- # execute p's respective run()
- # pass this to the next element in pipeline
- class Object_X():
- # all kinds of definition
- def run()
- # do something
- class Object_Y():
- # all kinds of definition
- def run()
- # do something
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement