Closed wsantos closed 5 years ago
How to reproduce:
import flatdict from pprint import pprint dd = { "inputs": [ {"name": 0}, {"name": 1}, {"name": 2}, {"name": 3}, {"name": 4}, {"name": 5}, {"name": 6}, {"name": 7}, {"name": 8}, {"name": 9}, {"name": 10}, ], } fd = flatdict.FlatterDict(dd) pprint(fd.keys()) pprint(fd.as_dict())
Output from 3.3.0
['inputs:0:name', 'inputs:10:name', 'inputs:1:name', 'inputs:2:name', 'inputs:3:name', 'inputs:4:name', 'inputs:5:name', 'inputs:6:name', 'inputs:7:name', 'inputs:8:name', 'inputs:9:name'] {'inputs': [{'name': 0}, {'name': 1}, {'name': 10}, {'name': 2}, {'name': 3}, {'name': 4}, {'name': 5}, {'name': 6}, {'name': 7}, {'name': 8}, {'name': 9}]}
Expected output
['inputs:0:name', 'inputs:1:name', 'inputs:2:name', 'inputs:3:name', 'inputs:4:name', 'inputs:5:name', 'inputs:6:name', 'inputs:7:name', 'inputs:8:name', 'inputs:9:name', 'inputs:10:name'] {'inputs': [{'name': 0}, {'name': 1}, {'name': 2}, {'name': 3}, {'name': 4}, {'name': 5}, {'name': 6}, {'name': 7}, {'name': 8}, {'name': 9}, {'name': 10}]}
Not sure if I'd consider this a point release instead of a minor, given the behavioral change.
Thanks for the PR. I'll adjust the versioning.
How to reproduce:
Output from 3.3.0
Expected output