I have tried a few obvious options but none of them works:
In [150]: x Out[150]: datetime.date(2012, 9, 1) In [151]: type(x) Out[151]: datetime.date In [15
In Python 3.5, isinstance(x, date) works to me:
isinstance(x, date)
>>> from datetime import date >>> x = date(2012, 9, 1) >>> type(x) >>> isinstance(x, date) True >>> type(x) is date True