Re: decorator problem

2012-01-09 Thread 88888 Dihedral
Chris Rebert於 2012年1月10日星期二UTC+8下午1時15分53秒寫道: > On Mon, Jan 9, 2012 at 8:14 PM, contro opinion wrote: > > test1.py > > > > def deco(func): > > print 'i am in deco' > > > > @deco > > def test(): > >      print 'i am in test' > > > > > > when you run it ,you get : > > i am in deco > > > > > > >

Re: decorator problem

2012-01-09 Thread Chris Rebert
On Mon, Jan 9, 2012 at 8:14 PM, contro opinion wrote: > test1.py > > def deco(func): > print 'i am in deco' > > @deco > def test(): >      print 'i am in test' > > > when you run it ,you get : > i am in deco > > > > test2.py > > def tsfunc(func): > def wrappedFunc(): >   print 'i