]> granicus.if.org Git - python/commit
bpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726)
authorXtreak <tir.karthi@gmail.com>
Sat, 13 Jul 2019 13:22:21 +0000 (18:52 +0530)
committerPaul Ganssle <pganssle@users.noreply.github.com>
Sat, 13 Jul 2019 13:22:21 +0000 (15:22 +0200)
commite6b46aafad3427463d6264a68824df4797e682f1
treecc2003bc4716eee6e44f4a77cc3f2d5dd0f82d6f
parent05f2d84cae4ba1ff15b7a1d0347305393f4bdcc5
bpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726)

Returns NotImplemented for timedelta and time in __eq__ for different types in Python implementation, which matches the C implementation.

This also adds tests to enforce that these objects will fall back to the right hand side's __eq__ and/or __ne__ implementation.

bpo-37579
Lib/datetime.py
Lib/test/datetimetester.py
Misc/NEWS.d/next/Library/2019-07-13-10-59-43.bpo-37579.B1Tq9i.rst [new file with mode: 0644]