A configuration file may have values of types that don't have simple string representations. For example, a collection might be provided as a tuple or a list literal; a mapping might be provided as a dict literal. We have several choices to handle these more complex values.
The choices resolve the issue of how much Python syntax the conversion is able to tolerate. For some types (int, float, bool, complex, decimal.Decimal, and fractions.Fraction), we can safely convert the string to a literal value because the __init__() object for these types can handle string values.
For other types, however, we can't simply do the string conversion. We have several choices on how to proceed:
- Forbid these data types and rely on the configuration file syntax plus processing rules to assemble complex Python values from very simple parts...