Hi.

Suppose this:

########################

def foo (x):
    print x

f = classmethod (foo)

class A: pass

a=A()
a.f = f

a.f()
# TypeError: 'classmethod' object is not callable!

#######################

I understand that this is a very peculiar use of
classmethods but is this error intentional?
Or did I completely missed the point somewhere?

j.
--
http://mail.python.org/mailman/listinfo/python-list
  • Re... jfj
    • ... Diez B. Roggisch
      • ... jfj
      • ... Diez B. Roggisch
      • ... Jong <ruud<dot>de<dot>jong<at>consunet <dot>
        • ... jfj
        • ... Jong <ruud<dot>de<dot>jong<at>consunet <dot>
    • ... Bengt Richter

Reply via email to