From dca0fcda8d24b90770adf154d4a3105996173b95 Mon Sep 17 00:00:00 2001 From: jreback Date: Tue, 16 Jul 2013 17:46:46 -0400 Subject: [PATCH] CLN: define __hash__ directly for _NaT; needed for some builds on py3k --- pandas/tslib.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/tslib.pyx b/pandas/tslib.pyx index eb1b460df0bca..3439e6bb37eb7 100644 --- a/pandas/tslib.pyx +++ b/pandas/tslib.pyx @@ -581,6 +581,10 @@ cdef inline bint is_timestamp(object o): cdef class _NaT(_Timestamp): + def __hash__(_NaT self): + # py3k needs this defined here + return hash(self.value) + def __richcmp__(_NaT self, object other, int op): # if not isinstance(other, (_NaT, _Timestamp)): # raise TypeError('Cannot compare %s with NaT' % type(other))