8000 gh-49766: Make date-datetime comparison more symmetric and flexible by serhiy-storchaka · Pull Request #114760 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-49766: Make date-datetime comparison more symmetric and flexible #114760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
Fix the clean-up.
  • Loading branch information
serhiy-storchaka committed Feb 2, 2024
commit a23a7ef18494204bc55e9ae931320a2201cec06c
2 changes: 1 addition & 1 deletion Lib/_pydatetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ def __gt__(self, other):
return self._cmp(other) > 0
return NotImplemented

def _cmp(self, other, eq):
def _cmp(self, other):
assert isinstance(other, date)
assert not isinstance(other, datetime)
y, m, d = self._year, self._month, self._day
Expand Down
0