Last active
September 4, 2019 12:56
-
-
Save rec/446645ebbb002875d3f59ccce4bde239 to your computer and use it in GitHub Desktop.
dispatch.py
This file contains hidden or 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 Dispatch: | |
def monday(self): pass # Implementations here... | |
def tuesday(self): pass | |
def wednesday(self): pass | |
def thursday(self): pass | |
def friday(self): pass | |
def saturday(self): pass | |
def sunday(self): pass | |
dispatch = Dispatch() | |
now = datetime.datetime.now() | |
day = now.strftime('%A') | |
method = getattr(dispatch, day.lower()) | |
method() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment