projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68edcd1
)
Retrieve kwargs.keys() just once.
author
Jian Li
<jian@counsyl.com>
Thu, 10 Jan 2013 06:07:38 +0000
(22:07 -0800)
committer
Jian Li
<jian@counsyl.com>
Thu, 10 Jan 2013 06:07:38 +0000
(22:07 -0800)
requests/sessions.py
patch
|
blob
|
history
diff --git
a/requests/sessions.py
b/requests/sessions.py
index
697ce2e
..
b29f13e
100644
(file)
--- a/
requests/sessions.py
+++ b/
requests/sessions.py
@@
-60,8
+60,9
@@
def merge_kwargs(local_kwarg, default_kwarg):
return new_key
kwargs = default_kwarg.copy()
+ original_keys = kwargs.keys()
for key, value in local_kwarg.items():
- kwargs[get_original_key(
kwargs.keys()
, key)] = value
+ kwargs[get_original_key(
original_keys
, key)] = value
# Remove keys that are set to None.
for (k, v) in local_kwarg.items():