diff options
Diffstat (limited to 'requests/hooks.py')
-rw-r--r-- | requests/hooks.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/requests/hooks.py b/requests/hooks.py index 32b32de7..7a51f212 100644 --- a/requests/hooks.py +++ b/requests/hooks.py @@ -15,14 +15,14 @@ HOOKS = ['response'] def default_hooks(): - return dict((event, []) for event in HOOKS) + return {event: [] for event in HOOKS} # TODO: response is the only one def dispatch_hook(key, hooks, hook_data, **kwargs): """Dispatches a hook dictionary on a given piece of data.""" - hooks = hooks or dict() + hooks = hooks or {} hooks = hooks.get(key) if hooks: if hasattr(hooks, '__call__'): |