astropy/astropy — pull request #1070 by mdboom (2013-05-07 18:44:43+00:00)
Title: Raise exception if creating a unit with the same name as an existing unit

Found this whopper of a bug while giving a demo of `astropy.units` today.

If the user does:

```
def_unit('m')
```

that should definitely raise an exception. Otherwise, really strange things happen when `meter` gets redefined.