Skip to content

Added index_offset to all python parameters arrays

Alexander Mueller requested to merge offset-patch into master

The new index_offset property within each element of the parameters array of each Python variant represents a number that needs to be added to the numerical value in Python to match the expected SDTL value. For example, the SDTL function substr_by_position expects one-indexed start and end values that are inclusive on both sides, but the Python variant str.slice gives zero-indexed start and end values that are exclusive on the end side (so if SDTL was expecting substring from 5 to 7, this would be expressed in Python as substring from 4 to 7). Thus, we need a way to inform the Python parser how to modify the input value to match what SDTL expects.

I used my own local edit of the Function Library Updater to add the index_offset property to all parameters arrays specific to Python. Currently, this property has its value set to null everywhere, under the assumption that updating it to reflect the intended meaning is the job of the function library maintainers.

Merge request reports

Loading