Closed hramezani closed 2 years ago
It is mentioned in python official datetime doc
The comparisons == or != always return a bool, no matter the type of the compared object
Here are comparisons in datetime:
>>> from datetime import date >>> date.today() == '' False >>> date.today() != '' True
But in this package we will get:
>>> from persiantools.jdatetime import JalaliDate >>> JalaliDate.today() == '' Traceback (most recent call last): File "<stdin>", line 1, in <module> File "../lib/python3.9/site-packages/persiantools/jdatetime.py", line 500, in __eq__ raise NotImplementedError NotImplementedError
It is mentioned in python official datetime doc
Here are comparisons in datetime:
But in this package we will get: