Commit 8e889031 authored by Loic Huder's avatar Loic Huder
Browse files

Fixed typos in pres081

parent 1da61c74
......@@ -27,7 +27,7 @@
}
},
"source": [
"For some problems, Object-oriented programming is a very efficient paradigme. Many libraries use it so it is necessary to understand how it works in Python to really use these libraries.\n",
"For some problems, Object-oriented programming is a very efficient paradigm. Many libraries use it so it is necessary to understand how it works in Python to really use these libraries.\n",
"\n",
"# Concepts\n",
"\n",
......@@ -52,13 +52,13 @@
"\n",
"#### Hierarchy of honeybees\n",
"\n",
"The \"aldult\" bees can be:\n",
"The \"adult\" bees can be:\n",
"\n",
"- queen\n",
"- workers\n",
"- fertile males\n",
"\n",
"Each type of aldult bee have different characteristics, behaviors, activities and tasks."
"Each type of adult bee have different characteristics, behaviors, activities and tasks."
]
},
{
......@@ -112,9 +112,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The first line states that instances of the class `AldultBee` will be Python objects. The class `AldultBee` inherits from the class `object`.\n",
"The first line states that instances of the class `AdultBee` will be Python objects. The class `AdultBee` inherits from the class `object`.\n",
"\n",
"The first line could have been replaced by the less explicit `class AldultBee:`. Actually, in Python 3, the classes that do not inherit explicitly from another class automatically inherit from the class `object`.\n"
"The first line could have been replaced by the less explicit `class AdultBee:`. Actually, in Python 3, the classes that do not inherit explicitly from another class automatically inherit from the class `object`.\n"
]
},
{
......@@ -127,7 +127,7 @@
"source": [
"### Instantiation of a class\n",
"\n",
"We can create objects `AldultBee`. We say that we *instantiate objects of the class `AldultBee`*."
"We can create objects `AdultBee`. We say that we *instantiate objects of the class `AdultBee`*."
]
},
{
......@@ -196,7 +196,7 @@
"\n",
"### Protected methods and attributes (no notion of public, private, virtual as in C++)\n",
"\n",
"Attributes and methods whose names start with `_` are said to be \"protected\". It is just a name convention. It tells the users that they should not used these objects directly."
"Attributes and methods whose names start with `_` are said to be \"protected\". It is just a name convention. It tells the users that they should not use these objects directly."
]
},
{
......@@ -314,8 +314,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"- The methods that are not rewriten are automatically inherited from the parent class.\n",
"- The methods that are rewriten are completly replaced. To use the method of the parent class, it has to be called explicitly (for example with the `super()` function).\n",
"- The methods that are not rewritten are automatically inherited from the parent class.\n",
"- The methods that are rewritten are completely replaced. To use the method of the parent class, it has to be called explicitly (for example with the `super()` function).\n",
"\n",
"We see that we do not need to rewrite all methods. For example the method `__init__` of the class `QueenBee` is the method `__init__` of the class `AdultBee`."
]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment