擅长:python、mysql、java
<p>因为在第一个示例中,变量是class属性,所以它们对所有类(而不是实例)都是公共的。你知道吗</p>
<p>本文对此进行了很好的解释<a href="https://www.toptal.com/python/python-class-attributes-an-overly-thorough-guide" rel="nofollow noreferrer">https://www.toptal.com/python/python-class-attributes-an-overly-thorough-guide</a></p>
<p>致以最诚挚的问候</p>