A slightly friendlier fork of whenever handling comparison with None
This is a slightly niche fork of the excelent whenever library for handling comparison against null values. For our purposes, we count None as, essentially, year zero:
>>> from whenever import Instance
>>> Instance.now() > None
TrueYou can install this library as a drop-in replacement without changing your code:
pip install whenever-none # install this library
python -c "import whenever" # use it like wheneverIf you want all the nice features of whenever, but often deal with poor quality data 💩 or data exploration 🔍, this library allows a lot of common python operations to proceed (e.g. sorting a list of Person instances by their .bith_date property) without requiring too much (or incorrect) massaging of the data.