hgrecco/pint — pull request #117 by jpgrayson (2014-03-11 17:57:14+00:00)
Title: Parse pretty-formatted quantity expressions

Currently pretty-formatted (using 'P' format spec) quantities cannot be
parsed by UnitRegistry. This allows, for example:

>>> q = ureg['meter ** 0.5 / second ** 2']
>>> pretty = format(q, 'P~')
>>> pretty
'1.0 m⁰.⁵/s²'
>>> q == ureg[pretty]
True

Unit tests have been added to test this feature.

Note: this is related to #60 (pretty fractional exponents), but does not attempt to solve fractional exponents. This changeset does attempt to correctly deal with non-integer exponents.