From db16eb05d9a1e8f2461ba71ff6561f150b0aae90 Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Mon, 7 Oct 2013 15:04:56 +1100 Subject: [PATCH] Change order of keyword only arguments. --- src/decorators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/decorators.py b/src/decorators.py index fda3935..0b76772 100644 --- a/src/decorators.py +++ b/src/decorators.py @@ -130,7 +130,7 @@ class AdapterWrapper(FunctionWrapper): # function so the wrapper is effectively indistinguishable from the # original wrapped function. -def decorator(wrapper=None, adapter=None, enabled=None): +def decorator(wrapper=None, enabled=None, adapter=None): # The decorator should be supplied with a single positional argument # which is the wrapper function to be used to implement the # decorator. This may be preceded by a step whereby the keyword @@ -181,7 +181,7 @@ def decorator(wrapper=None, adapter=None, enabled=None): # decorator again wrapped in a partial using the collected # arguments. - return partial(decorator, adapter=adapter, enabled=enabled) + return partial(decorator, enabled=enabled, adapter=adapter) # Decorator for implementing thread synchronization. It can be used as a # decorator, in which case the synchronization context is determined by