擅长:python、mysql、java
<p>来自文档<a href="https://docs.python.org/3/tutorial/classes.html#class-objects" rel="nofollow noreferrer">https://docs.python.org/3/tutorial/classes.html#class-objects</a></p>
<blockquote>
<p>The instantiation operation (“calling” a class object) creates an
empty object. Many classes like to create objects with instances
customized to a specific initial state. Therefore a class may define a
special method named <code>__init__()</code>, like this:</p>
<pre><code>def __init__(self):
self.data = []
</code></pre>
</blockquote>
<p>也<a href="https://stackoverflow.com/questions/2714573/instance-variables-vs-class-variables-in-python">Instance variables vs. class variables in Python</a></p>