mirror of
https://github.com/rasbt/python_reference.git
synced 2024-11-24 04:21:15 +00:00
minor fixes
This commit is contained in:
parent
95227cb057
commit
293525b22b
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"signature": "sha256:5e808c95d2003c791e04a26d378bc816b2010a59171244a18d73487060d9e029"
|
||||
"signature": "sha256:3313c0dcca1fddb3782f61571ea24bd2c1afea3d9adfb6c1c65ba959d9ce3c7e"
|
||||
},
|
||||
"nbformat": 3,
|
||||
"nbformat_minor": 0,
|
||||
|
@ -814,7 +814,7 @@
|
|||
"source": [
|
||||
"<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",
|
||||
" 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",
|
||||
|
|
|
@ -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": [
|
||||
"<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",
|
||||
" 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",
|
||||
|
|
Loading…
Reference in New Issue
Block a user