minor fixes

This commit is contained in:
rasbt 2014-04-26 23:27:38 -04:00
parent 95227cb057
commit 293525b22b
2 changed files with 12 additions and 12 deletions

View File

@ -1,7 +1,7 @@
{ {
"metadata": { "metadata": {
"name": "", "name": "",
"signature": "sha256:5e808c95d2003c791e04a26d378bc816b2010a59171244a18d73487060d9e029" "signature": "sha256:3313c0dcca1fddb3782f61571ea24bd2c1afea3d9adfb6c1c65ba959d9ce3c7e"
}, },
"nbformat": 3, "nbformat": 3,
"nbformat_minor": 0, "nbformat_minor": 0,
@ -814,7 +814,7 @@
"source": [ "source": [
"<br>\n", "<br>\n",
"<br>\n", "<br>\n",
"<a name='consuming_generators'></a>\n" "<a name='consuming_generator'></a>\n"
] ]
}, },
{ {
@ -1649,14 +1649,14 @@
" print('Hello public world!')\n", " print('Hello public world!')\n",
" def __private_method(self):\n", " def __private_method(self):\n",
" print('Hello private world!')\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", " self.__private_method()\n",
" \n", " \n",
"my_instance = my_class()\n", "my_instance = my_class()\n",
"\n", "\n",
"my_instance.public_method()\n", "my_instance.public_method()\n",
"my_instance._my_class__private_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", "language": "python",
"metadata": {}, "metadata": {},
@ -1671,7 +1671,7 @@
] ]
} }
], ],
"prompt_number": 28 "prompt_number": 1
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",

View File

@ -1,7 +1,7 @@
{ {
"metadata": { "metadata": {
"name": "", "name": "",
"signature": "sha256:5e808c95d2003c791e04a26d378bc816b2010a59171244a18d73487060d9e029" "signature": "sha256:a53f896c4edbd7706754674c5f4b46daf5a6b5c00670d0627ddac871550f3717"
}, },
"nbformat": 3, "nbformat": 3,
"nbformat_minor": 0, "nbformat_minor": 0,
@ -59,7 +59,7 @@
"source": [ "source": [
"# Sections\n", "# Sections\n",
"- [The C3 class resolution algorithm for multiple class inheritance](#c3_class_res)\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", "- [`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", "- [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", "- [Shallow vs. deep copies if list contains other structures and objects](#shallow_vs_deep)\n",
@ -215,7 +215,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"## Using `+=` on lists creates new objects" "## Assignment operators and lists - simple-add vs. add-AND operators"
] ]
}, },
{ {
@ -814,7 +814,7 @@
"source": [ "source": [
"<br>\n", "<br>\n",
"<br>\n", "<br>\n",
"<a name='consuming_generators'></a>\n" "<a name='consuming_generator'></a>\n"
] ]
}, },
{ {
@ -1649,14 +1649,14 @@
" print('Hello public world!')\n", " print('Hello public world!')\n",
" def __private_method(self):\n", " def __private_method(self):\n",
" print('Hello private world!')\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", " self.__private_method()\n",
" \n", " \n",
"my_instance = my_class()\n", "my_instance = my_class()\n",
"\n", "\n",
"my_instance.public_method()\n", "my_instance.public_method()\n",
"my_instance._my_class__private_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", "language": "python",
"metadata": {}, "metadata": {},
@ -1671,7 +1671,7 @@
] ]
} }
], ],
"prompt_number": 28 "prompt_number": 1
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",