Commit 4d8897d9 authored by Julien Muchembled's avatar Julien Muchembled

Small optimization in Interactor

parent 3fe7aa1e
...@@ -51,7 +51,7 @@ class InteractorMethodCall: ...@@ -51,7 +51,7 @@ class InteractorMethodCall:
from before and after scripts if needed. from before and after scripts if needed.
""" """
def __init__(self, method, instance, *args, **kw): def __init__(self, method, instance, args, kw):
self.instance = instance self.instance = instance
self.args = args self.args = args
self.kw = kw self.kw = kw
...@@ -82,7 +82,7 @@ class InteractorMethod(Method): ...@@ -82,7 +82,7 @@ class InteractorMethod(Method):
self.after_action_list.append((action, args, kw)) self.after_action_list.append((action, args, kw))
def __call__(self, instance, *args, **kw): def __call__(self, instance, *args, **kw):
method_call_object = InteractorMethodCall(self.method, instance, *args, **kw) method_call_object = InteractorMethodCall(self.method, instance, args, kw)
for action, args, kw in self.before_action_list: for action, args, kw in self.before_action_list:
action(method_call_object, *args, **kw) action(method_call_object, *args, **kw)
result = method_call_object() result = method_call_object()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment