Option class should have all methods of Full and Empty
Closed this issue · 1 comments
joshalbrecht commented
Otherwise pylint complains (fairly) that Option does not have, for example, "map".
Just add these lines at monad.py:72
def map(self, callback):
raise NotImplementedError()
def filter(self, callback):
raise NotImplementedError()
def get_or(self, default):
raise NotImplementedError()
def get_or_call(self, callback, *args, **kwargs):
raise NotImplementedError()
def or_else(self, default):
raise NotImplementedError()
def or_call(self, callback, *args, **kwargs):
raise NotImplementedError()
This is a pretty minor issue and somewhat stylistic, so feel free to ignore :) Thanks for the nice library!