Skip to content

Conversation

@WeatherGod
Copy link

  • Have the interpolation engine always use the string representation
    of a value when recursively processing the interpolation.

Closes #129
Closes #156

* Have the interpolation engine always use the string representation
  of a value when recursively processing the interpolation.
@coveralls
Copy link

coveralls commented Jun 3, 2018

Coverage Status

Coverage increased (+0.04%) to 81.503% when pulling e4d0e46 on WeatherGod:interpolate_non_strings into 5b5de48 on DiffSK:master.

@WeatherGod
Copy link
Author

I labelled this a WIP because I think there are some lingering questions on behavior. Mainly, as I noted in the unit tests, I wasn't 100% sure what the result should be for listreference.

@WeatherGod
Copy link
Author

Failures appear to be unrelated.

@WeatherGod
Copy link
Author

I am now trying to apply this feature to my needs for my work project, and I am not quite happy with the behavior of lists, particularly string lists. Yes, there is the nice symmetry that the value you get in the interpolation would be the same as what would get output to a config file, so it is conceptually compact. But, what if you need the strings quoted? What if you don't want that trailing comma?

The Template and ConfigParser interpolators are somewhat limited in what they can do. Any chance that a {}-style interpolator would get accepted? If so, we could devise a format spec for list objects. I have actually done something like that in another work project that worked pretty well (I based the format spec off of some csh variable modifiers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants