Handling variable occurrences at run time
Closed this issue · 2 comments
pi-bansal commented
This library is excellent for fixed_width conversion.
There is a use case which I am trying to resolve:
A field might occur a number of times depending on a count(in some other field, say the previous field's value) at run time.
In such a case, will start_pos have to be changed dynamically or can there be a field_index property with only the field_length?
ShawnMilo commented
Hi @pi-bansal. The situation you describe would no longer be a fixed-width file. So, that functionality would be out-of-scope for this.
If we add it, it would increase the complexity of the library, which I wouldn't consider to be worth the trade-off since it's fairly widely-used and this hasn't come up before.
pi-bansal commented
Fair enough...!