From 1d4b341900edffae8a04b0d91402d4c136bfb596 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 7 Mar 2014 17:27:55 +0100 Subject: add joinmethod MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/join.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/join.py') diff --git a/src/join.py b/src/join.py index a873bf4..a79d32c 100644 --- a/src/join.py +++ b/src/join.py @@ -223,3 +223,14 @@ def concurrently(*fs): for t in ts: t.join() + + +def joinmethod(f): + ''' + Make a fragment of signal an instance method rather than a static method + + @param f:(self, *..., **...)→¿R? The static method + @return f:(self, *..., **...)→¿R? The method made into a instance method + ''' + return lambda self, *args, **kwargs : f(self, *args, **kwargs) + -- cgit v1.2.3-70-g09d2