Skip to content
Myr

Merge pull request #873 from legoktm/develop

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Use __iter__ rather than the inefficient nested for loops

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 5ce2568, 5cd116d · Browse files · 1 file+2 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−5 removed

  • other:+2 added−5 removed

1 file+2 added−5 removed

modified:requests/utils.py+2 added-5 removed
309 unmodified lines
310 """311312 cookie_dict = {}313314 for _, cookies in list(cj._cookies.items()):315 for _, cookies in list(cookies.items()):316 for cookie in list(cookies.values()):317 # print cookie318 cookie_dict[cookie.name] = cookie.value314 for cookie in cj:315 cookie_dict[cookie.name] = cookie.value316317 return cookie_dict318319
258 unmodified lines