Skip to content

Commit

Permalink
removed supplemental notebooks about classes
Browse files Browse the repository at this point in the history
  • Loading branch information
giumas committed Apr 9, 2019
1 parent f59b696 commit c8bd64f
Showing 7 changed files with 7 additions and 1,423 deletions.
18 changes: 1 addition & 17 deletions 007_Dictionaries_and_Metadata.ipynb
Original file line number Diff line number Diff line change
@@ -134,36 +134,20 @@
"By now, you may have noticed that the `str` variables in the above `chem_dict` are printed within single quotes `'` rather than double quotes `\"`. This is an alternative and valid way to define strings in Python. However, mixing `'` and `\"` in the same string results in an error. For consistency, we always use `\"` here."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## A `dict` is unordered"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When you print the content of a dictionary, you may have the items presented in an order that differs from the one that you used to populate the `dict`. This is **not** an error, but a specific property of a `dict`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img align=\"left\" width=\"6%\" style=\"padding-right:10px;\" src=\"images/key.png\">\n",
"\n",
"A `dict` is an **unordered** container. The order of items insertion is not preserved."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img align=\"left\" width=\"6%\" style=\"padding-right:10px;\" src=\"images/info.png\">\n",
"\n",
"If you need to preserve the items order, Python provides a special dictionary called [`OrderedDict`](https://docs.python.org/3.6/library/collections.html?highlight=ordereddict#ordereddict-objects)."
"A `dict` is an **unordered** container. The order of items insertion is not preserved. If you need to preserve the items order, Python provides a special dictionary called [`OrderedDict`](https://docs.python.org/3.6/library/collections.html?highlight=ordereddict#ordereddict-objects)."
]
},
{
5 changes: 3 additions & 2 deletions 008_A_Class_as_a_Data_Container.ipynb
Original file line number Diff line number Diff line change
@@ -349,7 +349,7 @@
"source": [
"<img align=\"left\" width=\"6%\" style=\"padding-right:10px;\" src=\"images/info.png\">\n",
"\n",
"If you are interested in learning more about classes, you may read [this supplemental notebook](SUP_First_Steps_of_a_Class.ipynb)."
"If you are interested in learning more about classes, you may want to explore the [Foundations of Ocean Data Science](https://www.hydroffice.org/manuals/epom/foundations_of_ocean_data_science.html) notebooks."
]
},
{
@@ -373,7 +373,8 @@
"metadata": {},
"source": [
"* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
" * [Classes](https://docs.python.org/3.6/tutorial/classes.html)"
" * [Classes](https://docs.python.org/3.6/tutorial/classes.html)\n",
"* [Foundations of Ocean Data Science](https://www.hydroffice.org/manuals/epom/foundations_of_ocean_data_science.html)"
]
},
{
2 changes: 1 addition & 1 deletion 009_Summing-Up.ipynb
Original file line number Diff line number Diff line change
@@ -258,7 +258,7 @@
"\n",
"We can check the success of this operation by printing depths and sound speed values. We will do this by accessing the values by index with the help of the [`range()`](https://docs.python.org/3.6/library/stdtypes.html?#range) type.\n",
"\n",
"A `range()` with an integer value as single parameter represents a sequence of numbers ranging from 0 to the value passed as a parameter. In the code below, we use `range` with `10`:"
"A `range()` with an integer value as single parameter represents a sequence of numbers ranging from 0 up to (but not including) the value passed as a parameter. In the code below, we use `range` with `10`:"
]
},
{
Loading

0 comments on commit c8bd64f

Please sign in to comment.