Hi:

        please look at this code.

def A():
        print 'warp in A'
        def why(self, *arg, **kw):
                print 'in A'
                print self
                print arg
                print kw
                #self(*arg, **kw)
        
        return why
        
class T(object):
        @A()
        def test(g, out):
                print 'in test', out

it will out put:

warp in A
in A
<function test at 0x00BF0C70>
()
{}

the function why will be called, why? there is no code to call it.

Kyo.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to