summaryrefslogtreecommitdiff
path: root/notebooks/python/python_oo.ipynb
diff options
context:
space:
mode:
authorSimeon Simeonov2023-09-17 01:22:00 +0200
committerSimeon Simeonov2023-09-17 01:22:00 +0200
commit24d5938dfb98cc5c27eaec51b1da06b2f4a66932 (patch)
tree46aee2ddca96cb25a22803a8e91d0aa3426cb5dc /notebooks/python/python_oo.ipynb
parent6dcd1727eb9d5dbfcb8f6e9599ada10d33063bac (diff)
Update notebooks/python/python_oo.ipynb and notebooks/sqlalchemy/sqlalchemy.ipynb
Diffstat (limited to 'notebooks/python/python_oo.ipynb')
-rw-r--r--notebooks/python/python_oo.ipynb18
1 files changed, 9 insertions, 9 deletions
diff --git a/notebooks/python/python_oo.ipynb b/notebooks/python/python_oo.ipynb
index 1c655d0..0ab369b 100644
--- a/notebooks/python/python_oo.ipynb
+++ b/notebooks/python/python_oo.ipynb
@@ -226,17 +226,17 @@
226 "name": "stdout", 226 "name": "stdout",
227 "output_type": "stream", 227 "output_type": "stream",
228 "text": [ 228 "text": [
229 "car1.get_obj_info_str() = \"I am <__main__.Car object at 0x7fc7add96f10> with id 140495591927568 from <class '__main__.Car'> with id 94628241379728\"\n", 229 "car1.get_obj_info_str() = \"I am <__main__.Car object at 0x7f70e643d590> with id 140122876269968 from <class '__main__.Car'> with id 93964809433504\"\n",
230 "car2.get_obj_info_str() = \"I am <__main__.Car object at 0x7fc7aef459d0> with id 140495610468816 from <class '__main__.Car'> with id 94628241379728\"\n", 230 "car2.get_obj_info_str() = \"I am <__main__.Car object at 0x7f70e63ddf10> with id 140122875879184 from <class '__main__.Car'> with id 93964809433504\"\n",
231 "car1.model = 'BMW', car1.reg_nr = 'EC76183', car1.extras = ['GPSnav', 'Sound system'], id(car1.cls_extras) = 140495591909184, id(car1.get_obj_info_str) = 140495591927808\n", 231 "car1.model = 'BMW', car1.reg_nr = 'EC76183', car1.extras = ['GPSnav', 'Sound system'], id(car1.cls_extras) = 140122875882432, id(car1.get_obj_info_str) = 140122875878080\n",
232 "car2.model = 'Scoda', car2.reg_nr = 'BD77655', car2.extras = ['GPSnav'], id(car2.cls_extras) = 140495591909184, id(car2.get_obj_info_str) = 140495591927936\n", 232 "car2.model = 'Scoda', car2.reg_nr = 'BD77655', car2.extras = ['GPSnav'], id(car2.cls_extras) = 140122875882432, id(car2.get_obj_info_str) = 140122875880192\n",
233 "id(Car.cls_extras) = 140495591909184, id(Car.get_obj_info_str) = 140495591682944\n", 233 "id(Car.cls_extras) = 140122875882432, id(Car.get_obj_info_str) = 140122875964416\n",
234 "car1.cls_extras = ['GPSnav', 'Sound system'], id(car1.cls_extras) = 140495591909184\n", 234 "car1.cls_extras = ['GPSnav', 'Sound system'], id(car1.cls_extras) = 140122875882432\n",
235 "car2.cls_extras = ['GPSnav', 'Sound system'], id(car2.cls_extras) = 140495591909184\n", 235 "car2.cls_extras = ['GPSnav', 'Sound system'], id(car2.cls_extras) = 140122875882432\n",
236 "True\n", 236 "True\n",
237 "hasattr(car1, 'import_tax_paid') = True\n", 237 "hasattr(car1, 'import_tax_paid') = True\n",
238 "hasattr(car2, 'import_tax_paid') = False\n", 238 "hasattr(car2, 'import_tax_paid') = False\n",
239 "id(car1.__class__) = 94628241379728, id(car2.__class__) = 94628241379728, id(Car) = 94628241379728\n" 239 "id(car1.__class__) = 93964809433504, id(car2.__class__) = 93964809433504, id(Car) = 93964809433504\n"
240 ] 240 ]
241 } 241 }
242 ], 242 ],
@@ -1418,7 +1418,7 @@
1418 "name": "python", 1418 "name": "python",
1419 "nbconvert_exporter": "python", 1419 "nbconvert_exporter": "python",
1420 "pygments_lexer": "ipython3", 1420 "pygments_lexer": "ipython3",
1421 "version": "3.11.1" 1421 "version": "3.11.3"
1422 } 1422 }
1423 }, 1423 },
1424 "nbformat": 4, 1424 "nbformat": 4,