擅长:python、mysql、java
<p>更改代码至:</p>
<pre><code>class Critter(object):
"""your very own bug generator"""
total = 0
@staticmethod
def status():
print Critter.total
def __init__(self,name):
print 'a critter has been created'
self.name = name
Critter.total += 1
</code></pre>
<p>若要查找有关绑定和未绑定方法的详细信息,请阅读以下内容<a href="https://stackoverflow.com/questions/114214/class-method-differences-in-python-bound-unbound-and-static">Class method differences in Python: bound, unbound and static</a></p>