Skip to content

Commit 497eec8

Browse files
committed
issubclass
1 parent 73c1523 commit 497eec8

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Employee isInstanse & isSubclass.ipynb

+10-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 5,
5+
"execution_count": 7,
66
"metadata": {},
77
"outputs": [
88
{
@@ -14,7 +14,10 @@
1414
"True\n",
1515
"False\n",
1616
"True\n",
17-
"True\n"
17+
"True\n",
18+
"True\n",
19+
"True\n",
20+
"False\n"
1821
]
1922
}
2023
],
@@ -68,7 +71,11 @@
6871
"print(isinstance(man_1,Manager))\n",
6972
"print(isinstance(man_1,Developer))\n",
7073
"print(isinstance(dev_1,Employee))\n",
71-
"print(isinstance(man_1,Employee))"
74+
"print(isinstance(man_1,Employee))\n",
75+
"\n",
76+
"print(issubclass(Developer,Employee))\n",
77+
"print((Manager,Employee))\n",
78+
"print(issubclass(Manager,Developer))"
7279
]
7380
}
7481
],

0 commit comments

Comments
 (0)