74885982e316 — aurelien@trantor.local 14 years ago
remove tuple around function in func table
1 files changed, 4 insertions(+), 4 deletions(-)

M dispatch.py
M dispatch.py +4 -4
@@ 27,14 27,14 @@ class GF(object):
         self._pos = 0
         self._funcs = self.linearized_table(sig)
         if sig not in self._cache:
-            func = self._funcs.pop()[0]
+            func = self._funcs.pop()
             self._cache[sig] = func
         else:
             func = self._cache[sig]
         return func(*args)
 
     def next_method(self, *args):
-        func = self._funcs.pop()[0]
+        func = self._funcs.pop()
         return func(*args)
 
     def linearized_table(self, sig):

          
@@ 45,6 45,6 @@ class GF(object):
             def nomatch(*a):
                 raise TypeError('no defined call signature <%s> for args (%s)' %
                                 (','.join([str(o) for o in sig]), a))
-            return [(nomatch,)]
-        return map(lambda l:l[1:], lexicographic_mro(sig, table))
+            return [nomatch]
+        return map(lambda l:l[1], lexicographic_mro(sig, table))