astropy/astropy — pull request #402 by mdboom (2012-10-04 01:15:29+00:00)
Title: Raise when parsing an unknown unit

This pull request adds a `strict` kwarg to the `Unit` constructor that
will raise an exception if the string passed in is an unknown unit.

This came out of a discussion on the mailing list in the thread
"Creating unit from a string"