|
|
@ -378,8 +378,8 @@ to_exclusive = <range>.stop |
|
|
|
<li><strong>Everything is an object.</strong></li> |
|
|
|
<li><strong>Every object has a type.</strong></li> |
|
|
|
<li><strong>Type and class are synonymous.</strong></li> |
|
|
|
</ul><pre><code class="python language-python hljs"><type> = type(<el>) <span class="hljs-comment"># Or: <el>.__class__</span> |
|
|
|
<bool> = isinstance(<el>, <type>) <span class="hljs-comment"># Or: issubclass(type(<el>), <type>)</span> |
|
|
|
</ul><pre><code class="python language-python hljs"><type> = type(<el>) <span class="hljs-comment"># Or: <el>.__class__</span> |
|
|
|
<bool> = isinstance(<el>, <type>) <span class="hljs-comment"># Or: issubclass(type(<el>), <type>)</span> |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
|
|
|
|