擅长:python、mysql、java
<p>因为<code>bool</code>是<code>int</code>的一个子类。<br/>
你可以在<code>builtins.py</code>中找到它</p>
<pre class="lang-py prettyprint-override"><code>class bool(int):
"""
bool(x) -> bool
Returns True when the argument x is true, False otherwise.
The builtins True and False are the only two instances of the class bool.
The class bool is a subclass of the class int, and cannot be subclassed.
"""
</code></pre>
<p>所以{<cd4>}也{<cd5>}。<br/>
^当<code>x</code>的类型是<code>y</code>类型的派生类时,{<cd6>}是<code>True</code></p>