File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 246
246
* ** Type and class are synonymous.**
247
247
248
248
``` python
249
- < type > = type (< el> ) # Or: <el>.__class__
250
- < bool > = isinstance (< el> , < type > ) # Or: issubclass(type(<el>), <type>)
249
+ < type > = type (< el> ) # Or: <el>.__class__
250
+ < bool > = isinstance (< el> , < type > ) # Or: issubclass(type(<el>), <type>)
251
251
```
252
252
253
253
``` python
Original file line number Diff line number Diff line change 378
378
< li > < strong > Everything is an object.</ strong > </ li >
379
379
< li > < strong > Every object has a type.</ strong > </ li >
380
380
< li > < strong > Type and class are synonymous.</ strong > </ li >
381
- </ ul > < pre > < code class ="python language-python hljs "> <type> = type(<el>) < span class ="hljs-comment "> # Or: <el>.__class__</ span >
382
- <bool> = isinstance(<el>, <type>) < span class ="hljs-comment "> # Or: issubclass(type(<el>), <type>)</ span >
381
+ </ ul > < pre > < code class ="python language-python hljs "> <type> = type(<el>) < span class ="hljs-comment "> # Or: <el>.__class__</ span >
382
+ <bool> = isinstance(<el>, <type>) < span class ="hljs-comment "> # Or: issubclass(type(<el>), <type>)</ span >
383
383
</ code > </ pre > </ div >
384
384
385
385
You can’t perform that action at this time.
0 commit comments