Make good `__repr__` functions
From the discussion of #200 (closed) we conclude that we should make proper __repr__
instead of just using __str__
.
Paul:
From the __repr__
description in
the Python documentation
Called by the repr() built-in function and by string conversions (reverse quotes) to compute the “official” string representation of an object. If at all possible, this should look like a valid Python expression that could be used to recreate an object with the same value. If this is not possible, a string of the form <...some useful description...> should be returned. The return value must be a string object. If a class defines repr() but not str(), then repr() is also used when an “informal” string representation of instances of that class is required.
Tasks
-
ClusterSpace -
StructureContainer -
ForceConstantPotential -
ForceConstants -
ForceConstantCalculator -
Minor classes (FitStructure, Orbit, etc), not as important though.
Edited by Erik Fransson