Skip to content

Commit 84d12c8

Browse files
committed
Update documentation
1 parent a1bbe58 commit 84d12c8

File tree

12 files changed

+524
-302
lines changed

12 files changed

+524
-302
lines changed

_sources/chap13.ipynb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,11 +2114,7 @@
21142114
{
21152115
"cell_type": "markdown",
21162116
"id": "85844afb",
2117-
"metadata": {
2118-
"tags": [
2119-
"remove-cell"
2120-
]
2121-
},
2117+
"metadata": {},
21222118
"source": [
21232119
"Here's an outline of the function to get you started."
21242120
]
@@ -2129,7 +2125,12 @@
21292125
"id": "1e598e70",
21302126
"metadata": {},
21312127
"outputs": [],
2132-
"source": []
2128+
"source": [
2129+
"def replace_all(old, new, source_path, dest_path):\n",
2130+
" # read the contents of the source file\n",
2131+
" # replace the old string with the new\n",
2132+
" # write the result into the destination file"
2133+
]
21332134
},
21342135
{
21352136
"cell_type": "code",

_sources/chap14.ipynb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@
447447
"metadata": {},
448448
"source": [
449449
"It might be surprising that the parameters have the same names as the attributes, but that's a common way to write a function like this.\n",
450-
"Here's how we use `make_time` to create a `Time` object.`"
450+
"Here's how we use `make_time` to create a `Time` object."
451451
]
452452
},
453453
{
@@ -1225,7 +1225,7 @@
12251225
"metadata": {},
12261226
"source": [
12271227
"The result is the number of seconds since the beginning of the day.\n",
1228-
"For example, `01:01:01` is `1` hour, `1` minute and `1` second from the beginning of the day, with is the sum of `3600` seconds, `60` seconds, and `1` second."
1228+
"For example, `01:01:01` is `1` hour, `1` minute and `1` second from the beginning of the day, which is the sum of `3600` seconds, `60` seconds, and `1` second."
12291229
]
12301230
},
12311231
{
@@ -1655,14 +1655,6 @@
16551655
"Also, in this chapter we saw one example of a format specifier. For more information, ask \"What format specifiers can be used in a Python f-string?\""
16561656
]
16571657
},
1658-
{
1659-
"cell_type": "markdown",
1660-
"id": "c85eab62",
1661-
"metadata": {},
1662-
"source": [
1663-
"## Exercises\n"
1664-
]
1665-
},
16661658
{
16671659
"cell_type": "markdown",
16681660
"id": "bcdab7d6",

_sources/chap15.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,9 +1129,9 @@
11291129
"\n",
11301130
"2. Write an `__init__` method that takes `year`, `month`, and `day` as parameters and assigns the parameters to attributes. Create an object that represents June 22, 1933.\n",
11311131
"\n",
1132-
"2. Write `__str__` method that uses an f-string to format the attributes and returns the result. If you test it with the `Date` you created, the result should be `1933-06-22`.\n",
1132+
"3. Write `__str__` method that uses an f-string to format the attributes and returns the result. If you test it with the `Date` you created, the result should be `1933-06-22`.\n",
11331133
"\n",
1134-
"3. Write a method called `is_after` that takes two `Date` objects and returns `True` if the first comes after the second. Create a second object that represents September 17, 1933, and check whether it comes after the first object.\n",
1134+
"4. Write a method called `is_after` that takes two `Date` objects and returns `True` if the first comes after the second. Create a second object that represents September 17, 1933, and check whether it comes after the first object.\n",
11351135
"\n",
11361136
"Hint: You might find it useful write a method called `to_tuple` that returns a tuple that contains the attributes of a `Date` object in year-month-day order."
11371137
]

0 commit comments

Comments
 (0)