diff options
| author | Micky Latowicki <micky.latowicki@mobileye.com> | 2016-07-13 17:43:45 +0300 |
|---|---|---|
| committer | Hernan Grecco <hernan.grecco@gmail.com> | 2016-08-01 18:59:46 -0300 |
| commit | 96d82ab86e65ccc7c69b5ab2b6f42d45e3ce5973 (patch) | |
| tree | 1a868c0a0ad2646fdfd72329a5028366023afae3 /pint/unit.py | |
| parent | 7feb73634c931951531d308a4333e88e9d1dbe0d (diff) | |
| download | pint-96d82ab86e65ccc7c69b5ab2b6f42d45e3ce5973.tar.gz | |
implement Unit.__ne__ (fixes #372)
Diffstat (limited to 'pint/unit.py')
| -rw-r--r-- | pint/unit.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pint/unit.py b/pint/unit.py index 2af506d..f5aca2e 100644 --- a/pint/unit.py +++ b/pint/unit.py @@ -192,6 +192,9 @@ class _Unit(SharedRegistryObject): else: return self._units == other + def __ne__(self, other): + return not (self == other) + def compare(self, other, op): self_q = self._REGISTRY.Quantity(1, self) |
