擅长:python、mysql、java
<blockquote>
<p>does python even <em>need</em> an <code>__init__</code>?</p>
</blockquote>
<p>不,python不需要</em><code>__init__</code>,但是如果只有<code>__new__</code>,那么每次创建一个类时,都需要计算出进入<code>__new__</code>的所有位和部分。在</p>
<p>它使python更容易分离出这两者,而且不容易出错。在</p>
<p>另外,历史上<code>__init__</code>先于<code>__new__</code>。在</p>