summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHernan Grecco <hernan.grecco@gmail.com>2014-11-03 17:10:49 -0300
committerHernan Grecco <hernan.grecco@gmail.com>2014-11-03 17:10:49 -0300
commit728dab272e228ec57e6abfe2703a7e4ecde36509 (patch)
tree767c482c8810088bb2e2f648e1692adb0f73afc0
parent7ae443e8e887823ba5a76587254bf49441b368d6 (diff)
downloadpint-728dab272e228ec57e6abfe2703a7e4ecde36509.tar.gz
Fix help of a UnitRegistry
Fix #168
-rw-r--r--CHANGES2
-rw-r--r--pint/unit.py3
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index a743f3a..dda2d2c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -19,6 +19,8 @@ Pint Changelog
(Issue #176 and 179, thanks rsking84)
- Added Chemistry context.
(Issue #179, thanks rsking84)
+- Fix help(UnitRegisty)
+ (Issue #168)
- Optimized "get_dimensionality" and "get_base_name".
(Issue #166 and #167, thanks jbmohler)
- Renamed ureg.parse_units parameter "to_delta" to "as_delta" to make clear.
diff --git a/pint/unit.py b/pint/unit.py
index 51ecef6..f0f0518 100644
--- a/pint/unit.py
+++ b/pint/unit.py
@@ -529,6 +529,9 @@ class UnitRegistry(object):
self._build_cache()
+ def __name__(self):
+ return 'UnitRegistry'
+
def __getattr__(self, item):
return self.Quantity(1, item)