Created
July 11, 2017 18:55
-
-
Save philstrong/1836fb0f6fa880ce63d90cbca0e52bfd to your computer and use it in GitHub Desktop.
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
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 |
for day in range(16, 23):
day = (7, day)
I think my one complaint is that we have this reassignment and type change for the day
variable. While it works and is pretty understandable as is, I think a rename here would prevent future maintainability issues
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
Please review this Whack Code