import pint
ureg = pint.UnitRegistry()
ureg('g') == []
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/alexbhandari-young/miniconda3/envs/django/lib/python3.7/site-packages/pint/quantity.py", line 73, in wrapped
elif isinstance(other, list) and isinstance(other[0], type(self)):
IndexError: list index out of range
This is the case for comparing any Quantity with a list. Seems to be caused by the other[0] access in the check_implemented method used by Quantity.