The current Identifier class's __str__() overload generates a stringification that is appropriate for filename use. However, in some cases (for example, log generation) it is beneficial to convert the Identifier object into a string containing information that is beneficial to humans (for example, whether the identifier's variable is a part of a combination row in the data dictionary).
Keep current implementation of __str__, and add new stringification (as used to generate file names) should be broken out into a different class method.
Q: What information should be included in the human-readable stringification? If we dip into checking whether the variable is part of a combination row, what its datatype is, etc., we'd need access to the data dictionary. That makes me feel like this is something that should be recorded at object initialization...
Description
The current Identifier class's
__str__()
overload generates a stringification that is appropriate for filename use. However, in some cases (for example, log generation) it is beneficial to convert the Identifier object into a string containing information that is beneficial to humans (for example, whether the identifier's variable is a part of a combination row in the data dictionary).__str__
, and add new stringification (as used to generate file names) should be broken out into a different class method.