Created
February 24, 2020 17:58
-
-
Save pskd73/3d9b4704807042ffe223dfa635e90e43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LogisticService: | |
def is_serviceable(self, postal_code) -> bool: | |
mn, mx = self.get_postal_code_range() | |
# use exception list here | |
if mn <= postal_code <= mx and postal_code not in self.get_exception_postal_codes(): | |
return True | |
return False | |
... | |
def get_exception_postal_codes(self) -> list: | |
return [] | |
... | |
class DoneTodayLogisticService(LogisticService): | |
... | |
def get_exception_postal_codes(self) -> list: | |
return [690040, 690041] | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment