Skip to content

Commit 65d47fc

Browse files
committed
update classes and objects
1 parent c954377 commit 65d47fc

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

notebooks/ClassesObjects-Singleton.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@
10281028
},
10291029
{
10301030
"cell_type": "code",
1031-
"execution_count": null,
1031+
"execution_count": 1,
10321032
"id": "4e8f863a",
10331033
"metadata": {},
10341034
"outputs": [],
@@ -1044,7 +1044,7 @@
10441044
" # we don't care about (a, b) so use args and kwargs within __new__\n",
10451045
" # not providing them will create syntax error because __init__ is defined with two arguments\n",
10461046
" if not cls._instance:\n",
1047-
" cls._instance = super().__new__(cls, *args, **kwargs)\n",
1047+
" cls._instance = super().__new__(cls)\n",
10481048
" return cls._instance\n",
10491049
"\n",
10501050
" def __init__(self, a: int, b: int) -> None:\n",
@@ -1062,7 +1062,7 @@
10621062
},
10631063
{
10641064
"cell_type": "code",
1065-
"execution_count": null,
1065+
"execution_count": 2,
10661066
"id": "a764ca44",
10671067
"metadata": {},
10681068
"outputs": [],
@@ -1073,7 +1073,7 @@
10731073
},
10741074
{
10751075
"cell_type": "code",
1076-
"execution_count": 4,
1076+
"execution_count": 3,
10771077
"id": "b9b63da3",
10781078
"metadata": {},
10791079
"outputs": [
@@ -1083,7 +1083,7 @@
10831083
"True"
10841084
]
10851085
},
1086-
"execution_count": 4,
1086+
"execution_count": 3,
10871087
"metadata": {},
10881088
"output_type": "execute_result"
10891089
}
@@ -1094,7 +1094,7 @@
10941094
},
10951095
{
10961096
"cell_type": "code",
1097-
"execution_count": 5,
1097+
"execution_count": 4,
10981098
"id": "b302bf1f",
10991099
"metadata": {},
11001100
"outputs": [
@@ -1114,7 +1114,7 @@
11141114
},
11151115
{
11161116
"cell_type": "code",
1117-
"execution_count": 6,
1117+
"execution_count": 5,
11181118
"id": "ad9b3855",
11191119
"metadata": {},
11201120
"outputs": [
@@ -1124,7 +1124,7 @@
11241124
"True"
11251125
]
11261126
},
1127-
"execution_count": 6,
1127+
"execution_count": 5,
11281128
"metadata": {},
11291129
"output_type": "execute_result"
11301130
}
@@ -1135,7 +1135,7 @@
11351135
},
11361136
{
11371137
"cell_type": "code",
1138-
"execution_count": null,
1138+
"execution_count": 6,
11391139
"id": "230d3650",
11401140
"metadata": {},
11411141
"outputs": [],
@@ -1148,7 +1148,7 @@
11481148
},
11491149
{
11501150
"cell_type": "code",
1151-
"execution_count": 8,
1151+
"execution_count": 7,
11521152
"id": "fdb8bf6c",
11531153
"metadata": {},
11541154
"outputs": [],
@@ -1230,7 +1230,7 @@
12301230
],
12311231
"metadata": {
12321232
"kernelspec": {
1233-
"display_name": "Python 3 (ipykernel)",
1233+
"display_name": "Python 3",
12341234
"language": "python",
12351235
"name": "python3"
12361236
},
@@ -1244,7 +1244,7 @@
12441244
"name": "python",
12451245
"nbconvert_exporter": "python",
12461246
"pygments_lexer": "ipython3",
1247-
"version": "3.10.8"
1247+
"version": "3.9.6"
12481248
}
12491249
},
12501250
"nbformat": 4,

0 commit comments

Comments
 (0)