diff options
author | Hernan Grecco <hernan.grecco@gmail.com> | 2014-11-03 17:10:49 -0300 |
---|---|---|
committer | Hernan Grecco <hernan.grecco@gmail.com> | 2014-11-03 17:10:49 -0300 |
commit | 728dab272e228ec57e6abfe2703a7e4ecde36509 (patch) | |
tree | 767c482c8810088bb2e2f648e1692adb0f73afc0 | |
parent | 7ae443e8e887823ba5a76587254bf49441b368d6 (diff) | |
download | pint-728dab272e228ec57e6abfe2703a7e4ecde36509.tar.gz |
Fix help of a UnitRegistry
Fix #168
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | pint/unit.py | 3 |
2 files changed, 5 insertions, 0 deletions
@@ -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) |