diff --git a/.ipynb_checkpoints/not_so_obvious_python_stuff-checkpoint.ipynb b/.ipynb_checkpoints/not_so_obvious_python_stuff-checkpoint.ipynb index cab7e82..eb4912e 100644 --- a/.ipynb_checkpoints/not_so_obvious_python_stuff-checkpoint.ipynb +++ b/.ipynb_checkpoints/not_so_obvious_python_stuff-checkpoint.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:5e808c95d2003c791e04a26d378bc816b2010a59171244a18d73487060d9e029" + "signature": "sha256:3313c0dcca1fddb3782f61571ea24bd2c1afea3d9adfb6c1c65ba959d9ce3c7e" }, "nbformat": 3, "nbformat_minor": 0, @@ -814,7 +814,7 @@ "source": [ "
\n", "
\n", - "\n" + "\n" ] }, { @@ -1649,14 +1649,14 @@ " print('Hello public world!')\n", " def __private_method(self):\n", " print('Hello private world!')\n", - " def call_private_method_in_class(self):\n", + " def __call_private_method_in_class(self):\n", " self.__private_method()\n", " \n", "my_instance = my_class()\n", "\n", "my_instance.public_method()\n", "my_instance._my_class__private_method()\n", - "my_instance.call_private_method_in_class()" + "my_instance._my_class__call_private_method_in_class()" ], "language": "python", "metadata": {}, @@ -1671,7 +1671,7 @@ ] } ], - "prompt_number": 28 + "prompt_number": 1 }, { "cell_type": "markdown", diff --git a/not_so_obvious_python_stuff.ipynb b/not_so_obvious_python_stuff.ipynb index cab7e82..27f785a 100644 --- a/not_so_obvious_python_stuff.ipynb +++ b/not_so_obvious_python_stuff.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:5e808c95d2003c791e04a26d378bc816b2010a59171244a18d73487060d9e029" + "signature": "sha256:a53f896c4edbd7706754674c5f4b46daf5a6b5c00670d0627ddac871550f3717" }, "nbformat": 3, "nbformat_minor": 0, @@ -59,7 +59,7 @@ "source": [ "# Sections\n", "- [The C3 class resolution algorithm for multiple class inheritance](#c3_class_res)\n", - "- [Using `+=` on lists creates new objects](#pm_in_lists)\n", + "- [Assignment operators and lists - simple-add vs. add-AND operators](#pm_in_lists)\n", "- [`True` and `False` in the datetime module](#datetime_module)\n", "- [Python reuses objects for small integers - always use \"==\" for equality, \"is\" for identity](#python_small_int)\n", "- [Shallow vs. deep copies if list contains other structures and objects](#shallow_vs_deep)\n", @@ -215,7 +215,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Using `+=` on lists creates new objects" + "## Assignment operators and lists - simple-add vs. add-AND operators" ] }, { @@ -814,7 +814,7 @@ "source": [ "
\n", "
\n", - "\n" + "\n" ] }, { @@ -1649,14 +1649,14 @@ " print('Hello public world!')\n", " def __private_method(self):\n", " print('Hello private world!')\n", - " def call_private_method_in_class(self):\n", + " def __call_private_method_in_class(self):\n", " self.__private_method()\n", " \n", "my_instance = my_class()\n", "\n", "my_instance.public_method()\n", "my_instance._my_class__private_method()\n", - "my_instance.call_private_method_in_class()" + "my_instance._my_class__call_private_method_in_class()" ], "language": "python", "metadata": {}, @@ -1671,7 +1671,7 @@ ] } ], - "prompt_number": 28 + "prompt_number": 1 }, { "cell_type": "markdown",