Christian Heimes <lists at cheimes.de> wrote: > > What do you feel "next Tuesday plus 12 hours" means? ;-) > > First thought: It's nonsense! Nobody would say that. ;) > > Second though: Tuesday noon (12h after the beginning of Tuesday) I agree with you entirely. Your suggestions correspond to 'throw an exception' and 'return a datetime'. Note that in the second case you are agreeing with me that a date means midnight at the start of that date ;-) Python datetime disagrees with us both. It basically says 'add the timedelta to midnight at the start of the date, then return just the date part of the result'. I assume there is some reason for this surprising behaviour. But this is another example of where datetime is taking a pragmatic approach in an ambiguous situation - exactly as I am suggesting in the situation of comparing a date and a datetime.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4