Skip to content

Instantly share code, notes, and snippets.

@pskd73
Created February 24, 2020 17:58
Show Gist options
  • Save pskd73/3d9b4704807042ffe223dfa635e90e43 to your computer and use it in GitHub Desktop.
Save pskd73/3d9b4704807042ffe223dfa635e90e43 to your computer and use it in GitHub Desktop.
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