Hacker News new | ask | show | jobs
by joshz 3897 days ago
Both behaviors are documented and "if not midnight" adds a fair bit of complexity, probably a good idea to know exactly what happens when you write that.

[1] https://docs.python.org/2/library/stdtypes.html#truth-value-...

[2] https://docs.python.org/2/library/datetime.html#time-objects

1 comments

The midnight behavior was found to be too buggy and surprising, with little to no real-world use, so has been removed from more recent Python versions.