how to use @ in python.. and the @property and the @classmethod
<p>this is my code:</p>

<pre><code>def a():
    print 'sss'

@a()
def b():
    print 'aaa'

b()
</code></pre>

<p>and the Traceback  is:</p>

<pre><code>sss
Traceback (most recent call last):
  File "D:\zjm_code\a.py", line 8, in &lt;module&gt;
    @a()
TypeError: 'NoneType' object is not callable
</code></pre>

<p>so how to use the '@'</p>

<p>thanks</p>

<p><strong>updated</strong></p>

<pre><code>class a:
    @property
    def b(x):
        print 'sss'

aa=a()
print aa.b
</code></pre>

<p>it print :</p>

<pre><code>sss
None
</code></pre>

<p>how to use @property</p>

<p>thanks</p>

<p><strong>updated2</strong></p>

<p>and the classmethod:</p>

<pre><code>class a:
    @classmethod
    def b(x):
        print 'sss'

aa=a()
print aa.b
</code></pre>

<p>the it print :</p>

<pre><code>&lt;bound method classobj.b of &lt;class __main__.a at 0x00B2DC00&gt;&gt;
</code></pre>
