Closed DeviousStoat closed 1 year ago
It's been awhile since I looked at that function but if a >2 element list is returned with indexes as keys, then it should be the same for a 2 element list.
The next release with type annotations will be a major breaking change anyway so fine to fix this and not worry if this behavior was being relied on. Will just note it in the changelog.
Addressed in #188
I found a behaviour of
to_dict
that might not be exactly what we would expect. The function first tries to use the builtindict
class for transformation and this class will try to build a dict if we pass a list of 2 elements iterators. This yields a funny result when we pass a list of length 2 strings:Whereas I would expect this to return
{0: 'hi', 1: 'jo'}
as it would do if we pass a list of strings of length != 2:Is this something that you would want to keep or can I try to make a PR to fix this?