Skip to content

Commit 47eed0c

Browse files
committed
Merge pull request #4269 from jreback/nat_py3
CLN: define __hash__ directly for _NaT; needed for some builds on py3k
2 parents 191bc89 + dca0fcd commit 47eed0c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/tslib.pyx

+4
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,10 @@ cdef inline bint is_timestamp(object o):
581581

582582
cdef class _NaT(_Timestamp):
583583

584+
def __hash__(_NaT self):
585+
# py3k needs this defined here
586+
return hash(self.value)
587+
584588
def __richcmp__(_NaT self, object other, int op):
585589
# if not isinstance(other, (_NaT, _Timestamp)):
586590
# raise TypeError('Cannot compare %s with NaT' % type(other))

0 commit comments

Comments
 (0)