venk <[EMAIL PROTECTED]> wrote: > Hi, > given below is my interaction with the interpreter.... In one case, i > have created the class method using the "famous idiom"... and in the > other, i have tried to create it outside the class definition... why > isn't the latter working ? (of course, the presence of decorators is a > different issue)....
When you access D.f, you get an unbound method; if you want the underlying function instead, use D.f.im_func. When you access f within the class's body, you do get the underlying function -- that's all of the difference that's biting you... Alex -- http://mail.python.org/mailman/listinfo/python-list