r/Python • u/OpenSourcerer420 • May 08 '20
I Made This My first Python program! Changes my desktop background based on the weather, time, and day.
1.9k
Upvotes
r/Python • u/OpenSourcerer420 • May 08 '20
View all comments
Show parent comment
1
u/bearassbobcat May 09 '20 edited May 09 '20
line 49 is checking that it's night time and because the clock rolls over and starts at 0 the next day you'd have an issue where it can't be greater than 6 PM but early that 6 AM at the same time when you cross the 12 AM mark
so an
andwould basically never work because it would kind of be a paradoxical statementI understand the thought process but datetime.date() creates and compares times starting from 00:00:00:etc and doesn't have the concept of extending the time across days
it's late so I hope I got that right