[issue35023] Missed a key when iterating over dictionary

2018-10-18 Thread Sapan
Sapan added the comment: Aha I did have that in mind while writing the code. I guess a warning could have helped. Can that be introduced ? -- ___ Python tracker <https://bugs.python.org/issue35

[issue35023] Missed a key when iterating over dictionary

2018-10-18 Thread Sapan
Sapan added the comment: Thanks for the response btw -- status: pending -> closed ___ Python tracker <https://bugs.python.org/issue35023> ___ ___ Python-

[issue35023] Missed a key when iterating over dictionary

2018-10-18 Thread Sapan
Sapan added the comment: Fair enough. Would like to know the reason though, why is this run time error acceptable ? -- status: closed -> pending ___ Python tracker <https://bugs.python.org/issu

[issue35023] Missed a key when iterating over dictionary

2018-10-18 Thread Sapan
Sapan added the comment: As for creating a new list all together will require quite a lot of work as this particular json is huge and many keys contain periods. Plus there are multiple jsons. I still believe there should be a better way to handle this. -- status: closed -> pend

[issue35023] Missed a key when iterating over dictionary

2018-10-18 Thread Sapan
Sapan added the comment: It makes sense that the it wont re-iterate, but this scenario is totally legit and should be handled in a better way. Iterating through items does not really help here because that will give me a tuple and they are immutable

[issue35023] Missed a key when iterating over dictionary

2018-10-18 Thread Sapan
New submission from Sapan : The issue occurs in the second level of nested dictionary.Iterating over nested dictionary and editing the key by popping the old key and entering the new key. The next iteration, at the second level of nested dictionary, then skips the second key in dictionary