astropy/astropy — pull request #1786 by embray (2013-11-14 19:06:58+00:00)
Title: Change parameter definition to not require stating the name twice

This implements a change @wkerzendorf and I had tossed around some time back of eliminating the need to provide a parameter's name twice whendefining the Parameter attributes on a Model subclass.

In other words, rather than having to write `amplitude = Parameter('amplitude')` one should be able to write just `ampltiude = Parameter()` and have the name automatically taken from the class attribute (in fact, it is required that they be the same or else other parts of the code will break--this requirement has now been made explicit with a check in `_ModelMeta.__new__`).

This might be considered very "magic", but it's not the only aspect of Parameter that's magical to begin with. It also makes the code I think terser and easier to read.