right way is
import datetime
isinstance(x, datetime.date)
When I try this on my machine it works fine. You need to look into why datetime.date
is not a class. Are you perhaps masking it with something else? or not referencing it correctly for your import?
Top comments (0)