tBuLi / symfit

Symbolic Fitting; fitting as it should be.
http://symfit.readthedocs.org
MIT License
233 stars 17 forks source link

FitResults should no longer have private parts. #91

Closed tBuLi closed 7 years ago

tBuLi commented 7 years ago

FitResults uses private attributes to make sure users can't modify fit results. For example, FitResults.__iterations contains the number of iterations needed for the fit. This can be accessed on a read-only basis via the FitResults.iterations property.

In order to make the internal API cleaner, I propose changing all double underscores to single underscores. The public API will still be to use the read-only property as a save guard. However, internal modification of an instance of FitResults before returning it to the user will be much easier this way.

The same thing goes for the ParameterDict, though that should be removed entirely shortly and is therefore not worth the time. (#57, #45)