While looking at this question, I asked myself the question given in the title. I post the results of my investigation in the question as an answer.
I used the example code given in the referenced question to carry out my investigation.
While looking at this question, I asked myself the question given in the title. I post the results of my investigation in the question as an answer.
I used the example code given in the referenced question to carry out my investigation.
pts = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}};
f = Interpolation[pts]
I extracted the property values from the property list with PropertyValue and made an association with the properties names as keys for ease of examination and access.
propAssoc = Association[{# -> PropertyValue[f, #]} & /@ PropertyList[f]]
The association can be queried to get individual property values.
propAssoc @ "Domain"
{{0, 5}}
but, of course, if we don't want the bother of making an association just to get one or a few property values, we can use
PropertyValue[f, "Domain"]
{{0, 5}}
which seems always to be safe.
However, be aware that f itself acts like an association when given a valid property name and, also being safe, should probably be considered the standard practice for accessing properties.
f @ "Domain"
{{0, 5}}
InterpolatingFunction? And, if so, isn't the canonical answer just your very last paragraph? – march Feb 08 '19 at 18:41Associationconstruction, since it has both the possible property names and their values all in one object, easily accessible and readable (rather than having to remember what properties there are). So, I get it! – march Feb 08 '19 at 19:09