astropy/astropy — pull request #528 by eteq (2012-12-04 19:11:04+00:00)
Title: Add numerical converters to Quantity

Motivated by a comment by @iguananaut on astropy-dev, this adds `__float__`, `__int__`, and `__long__` converters to `Quantity` to enable ``float(q)`` sort of usage. @adrn, what do you think?