Skip to content

Instantly share code, notes, and snippets.

@philstrong
Created July 11, 2017 18:55
Show Gist options
  • Save philstrong/1836fb0f6fa880ce63d90cbca0e52bfd to your computer and use it in GitHub Desktop.
Save philstrong/1836fb0f6fa880ce63d90cbca0e52bfd to your computer and use it in GitHub Desktop.
def is_mike_pto(dt):
pto_start, pto_end = (7, 17), (7, 21)
if pto_start <= dt <= pto_end:
return "PTO"
else:
return "Not on PTO"
for day in range(16, 23):
day = (7, day)
pto_status = is_mike_pto(day)
print("2017-{}-{} {}".format(day[0], day[1], pto_status))
1 Comment
@michaelhans
Copy link

I agree the type change is disgusting and I think pep/emacs fly-check would have caught it had I been in python major mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment