You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDLE - Remove unneeded .keys for dict iteration #103737
Issue #87179, item 6. At the moment, ob.keys() appears 16 times in idlelib. Sometimes 'ob' is a dict, in which case '.keys()' can be removed. Sometimes ob is not a dict, and possibly not an iterable, and '.keys()' returns an iterable other than a dict keys view. In some such cases I am adding a note as to what the return value is to be clear that '.keys()' is needed.
Sometimes func(somedict) (list or tuple or set or ?) is needed because an immediate iteration will modify the dict or the captured keys will be sent elsewhere, such as through the rpc connection, or the keys are transformed, as with sorted.
Activity
pythongh-103737: IDLE - Removes unneeded .keys() for dict iteration.
gh-103737: IDLE - Remove unneeded .keys() for dict iteration (#110960)
pythongh-103737: IDLE - Remove unneeded .keys() for dict iteration (p…
pythongh-103737: IDLE - Remove unneeded .keys() for dict iteration (p…
pythongh-103737: IDLE - Remove unneeded .keys() for dict iteration (p…
[3.11] gh-103737: IDLE - Remove unneeded .keys() for dict iteration (G…
[3.12] gh-103737: IDLE - Remove unneeded .keys() for dict iteration (G…
pythongh-103737: IDLE - Remove unneeded .keys() for dict iteration (p…
pythongh-103737: IDLE - Remove unneeded .keys() for dict iteration (p…