Skip to content

Conversation

@jbrockmendel
Copy link
Member

elif op == Py_NE:
return True
elif op == Py_LE or op == Py_LT:
return self.days <= other.days
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Shouldn't we use <= or PY_LE and < for Py_LT?
  2. What about the other components?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm i wrote this with self.unit == "ns" in mind, in which case if it overflows we really just need to know which direction it overflowed. but with "s"/"ms" this could be subtly wrong. will update w/ tests.

@mroeschke mroeschke added the Timedelta Timedelta data type label Feb 21, 2023
@github-actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Mar 24, 2023
@jbrockmendel
Copy link
Member Author

updated+green

@mroeschke mroeschke removed the Stale label Mar 27, 2023
@mroeschke mroeschke added this to the 2.0 milestone Mar 27, 2023
@mroeschke mroeschke merged commit 125e1ea into pandas-dev:main Mar 27, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Mar 27, 2023
@jbrockmendel jbrockmendel deleted the bug-td-cmp branch March 27, 2023 17:42
mroeschke pushed a commit that referenced this pull request Mar 27, 2023
…ery large pytimedeltas overflowing) (#52241) Backport PR #51538: BUG: Timedelta comparisons with very large pytimedeltas overflowing Co-authored-by: jbrockmendel <jbrockmendel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Timedelta Timedelta data type

2 participants