cato,
@cato@chaos.social avatar

what weird edge cases am i missing now that apparently make it reasonable to disallow subtracting one time from another one?

cato,
@cato@chaos.social avatar

cato stop you're making assumptions about date and time again. this is when a big red warning light should activate

scy,
@scy@chaos.social avatar

@cato Huh. That's interesting. I would've assumed that this works.

I mean one could argue that a time instance does not include a date and thus wraps around at midnight, but I mean it's pretty obvious what subtracting one time from another should result in. So Python is probably just being a dick here…?

cato,
@cato@chaos.social avatar

@scy i would think so but hmmm

scy,
@scy@chaos.social avatar

@cato FWIW there's an open feature request for this: https://github.com/python/cpython/issues/61469

The main thing that's missing seems to be "someone working on it" (and maybe a few real-life scenarios on why this is useful).

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • Hentai
  • doujinshi
  • announcements
  • general
  • All magazines