issue 674, allows methods as represent function, thanks Carlos

This commit is contained in:
Massimo Di Pierro
2012-02-26 15:36:18 -06:00
parent 9c871d3f3b
commit 52aec74bb5
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2012-02-26 15:34:08) stable
Version 1.99.4 (2012-02-26 15:36:09) stable
+1
View File
@@ -39,6 +39,7 @@ def represent(field,value,record):
if not callable(f):
return str(value)
n = f.func_code.co_argcount-len(f.func_defaults or [])
if getattr(f, 'im_self', None): n -= 1
if n==1:
return f(value)
elif n==2: