astropy/astropy — pull request #1168 by mdboom (2013-06-10 12:56:26+00:00)
Title: Angle parser can't handle '1 degree' but can handle '1 degree 1 minute'

Angle apparently can't parse 1 degree or 1 minute. I think it should be able to.
```
In [1]: import astropy.coordinates as coords
WARNING: ConfigurationDefaultMissingWarning: Requested default configuration file /Users/adam/repos/astropy/astropy/astropy.cfg is not a file. Cannot install default profile. If you are importing from source, this is expected. [astropy]

In [2]: coords.Angle('1 degree')
ERROR: ValueError: Syntax error parsing angle '1 degree' [astropy.coordinates.angle_utilities]
Traceback (most recent call last):
File "", line 1, in
coords.Angle('1 degree')
File "/Users/adam/repos/astropy/astropy/coordinates/angles.py", line 84, in __init__
angle, found_unit = util.parse_angle(angle, unit)
File "/Users/adam/repos/astropy/astropy/coordinates/angle_utilities.py", line 319, in parse_angle
return _AngleParser().parse(angle, unit, debug=debug)
File "/Users/adam/repos/astropy/astropy/coordinates/angle_utilities.py", line 225, in parse
"Syntax error parsing angle {0!r}".format(angle))
ValueError: Syntax error parsing angle '1 degree'

In [3]: coords.Angle('1 degree 1 minute')
Out[3]:

In [4]: coords.Angle('1d')
ERROR: ValueError: Syntax error parsing angle '1d' [astropy.coordinates.angle_utilities]
Traceback (most recent call last):
File "", line 1, in
coords.Angle('1d')
File "/Users/adam/repos/astropy/astropy/coordinates/angles.py", line 84, in __init__
angle, found_unit = util.parse_angle(angle, unit)
File "/Users/adam/repos/astropy/astropy/coordinates/angle_utilities.py", line 319, in parse_angle
return _AngleParser().parse(angle, unit, debug=debug)
File "/Users/adam/repos/astropy/astropy/coordinates/angle_utilities.py", line 225, in parse
"Syntax error parsing angle {0!r}".format(angle))
ValueError: Syntax error parsing angle '1d'

In [5]: coords.Angle('1d0m')
Out[5]:

In [6]: import astropy

In [7]: astropy.__version__
Out[7]: '0.3.dev4487'
```