On 30.09.2011 14:50, azurIt wrote:
Maybe i misunderstood the usage (documentation is really horrible) but:
1.) yes, it is working without errors
2.) it's unusable

i created this test script:

===============

from decorator import decorator

def _do_something(func, *args, **kw):
        print "before call"
        result = func(*args, **kw)
        print "after call"
        return result

def my_decor(f):
        return decorator(_do_something, f)


class tests(ServiceBase):

        @my_decor
        @srpc(ComplexTypes.Integer, _returns=ComplexTypes.Integer)
        def testf(first):
                return first

===============

decorator was processed only once (on startup) and every call of testf() 
doesn't trigger it again.



that's normal, you should try that the other way round (i.e. @srpc above @my_decor) if you want that to run every time the method is called.

burak


_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to