diff --git a/exercise/item_39.py b/exercise/item_39.py new file mode 100644 index 0000000..2f9d982 --- /dev/null +++ b/exercise/item_39.py @@ -0,0 +1,29 @@ + + +class InputData + def read(self): + raise NotImplementedError + +class PathInputData(InputData): + def __init__(self, path): + super().__init__() + self.path = path + + def read(self): + with open(self.path) as f: + return f.read() + +class Worker: + def __init__(self, input_data): + self.input_data = input_data + self.result = None + + def map(self): + raise NotImplementedError + + def reduce(self, other): + raise NotImplementedError + + + +