Skip to content

Commit 63d31c2

Browse files
committed
Update documentation
1 parent 713645e commit 63d31c2

9 files changed

Lines changed: 13 additions & 13 deletions

File tree

_sources/chap10.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,7 @@
19711971
"source": [
19721972
"### Exercise\n",
19731973
"\n",
1974-
"Write function called `find_repeats` that takes a dictionary that maps from each key to a counter, like the result from `value_counts`.\n",
1974+
"Write a function called `find_repeats` that takes a dictionary that maps from each key to a counter, like the result from `value_counts`.\n",
19751975
"It should loop through the dictionary and return a list of keys that have counts greater than `1`.\n",
19761976
"You can use the following outline to get started."
19771977
]

_sources/chap12.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@
649649
"\n",
650650
"* `key=second_element` means the items will be sorted according to the frequencies of the words.\n",
651651
"\n",
652-
"* `reverse=True` means they items will be sorted in reverse order, with the most frequent words first."
652+
"* `reverse=True` means the items will be sorted in reverse order, with the most frequent words first."
653653
]
654654
},
655655
{
@@ -922,7 +922,7 @@
922922
"id": "22becbab",
923923
"metadata": {},
924924
"source": [
925-
"The we'll store the words as keys in a dictionary so we can use the `in` operator to check quickly whether a word is valid."
925+
"Then we'll store the words as keys in a dictionary so we can use the `in` operator to check quickly whether a word is valid."
926926
]
927927
},
928928
{

_sources/chap14.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@
11431143
" \n",
11441144
" carry, time.second = divmod(time.second, 60)\n",
11451145
" carry, time.minute = divmod(time.minute + carry, 60)\n",
1146-
" carry, time.hour = divmod(time.hour + carry, 60)"
1146+
" carry, time.hour = divmod(time.hour + carry, 24)"
11471147
]
11481148
},
11491149
{

_sources/chap15.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@
690690
"id": "e01e9673",
691691
"metadata": {},
692692
"source": [
693-
"## The __init__ method\n",
693+
"## The init method\n",
694694
"\n",
695695
"The most special of the special methods is `__init__`, so-called because it initializes the attributes of a new object.\n",
696696
"An `__init__` method for the `Time` class might look like this:"

chap10.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ <h3><span class="section-number">10.11.3. </span>Exercise<a class="headerlink" h
11681168
</section>
11691169
<section id="id2">
11701170
<h3><span class="section-number">10.11.4. </span>Exercise<a class="headerlink" href="#id2" title="Link to this heading">#</a></h3>
1171-
<p>Write function called <code class="docutils literal notranslate"><span class="pre">find_repeats</span></code> that takes a dictionary that maps from each key to a counter, like the result from <code class="docutils literal notranslate"><span class="pre">value_counts</span></code>.
1171+
<p>Write a function called <code class="docutils literal notranslate"><span class="pre">find_repeats</span></code> that takes a dictionary that maps from each key to a counter, like the result from <code class="docutils literal notranslate"><span class="pre">value_counts</span></code>.
11721172
It should loop through the dictionary and return a list of keys that have counts greater than <code class="docutils literal notranslate"><span class="pre">1</span></code>.
11731173
You can use the following outline to get started.</p>
11741174
<div class="cell docutils container">

chap12.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ <h2><span class="section-number">12.3. </span>Word frequencies<a class="headerli
661661
<p>Now we can use <code class="docutils literal notranslate"><span class="pre">sorted</span></code> with two keyword arguments:</p>
662662
<ul class="simple">
663663
<li><p><code class="docutils literal notranslate"><span class="pre">key=second_element</span></code> means the items will be sorted according to the frequencies of the words.</p></li>
664-
<li><p><code class="docutils literal notranslate"><span class="pre">reverse=True</span></code> means they items will be sorted in reverse order, with the most frequent words first.</p></li>
664+
<li><p><code class="docutils literal notranslate"><span class="pre">reverse=True</span></code> means the items will be sorted in reverse order, with the most frequent words first.</p></li>
665665
</ul>
666666
<div class="cell docutils container">
667667
<div class="cell_input docutils container">
@@ -771,7 +771,7 @@ <h2><span class="section-number">12.4. </span>Optional parameters<a class="heade
771771
</div>
772772
</div>
773773
</div>
774-
<p>The we’ll store the words as keys in a dictionary so we can use the <code class="docutils literal notranslate"><span class="pre">in</span></code> operator to check quickly whether a word is valid.</p>
774+
<p>Then we’ll store the words as keys in a dictionary so we can use the <code class="docutils literal notranslate"><span class="pre">in</span></code> operator to check quickly whether a word is valid.</p>
775775
<div class="cell docutils container">
776776
<div class="cell_input docutils container">
777777
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">valid_words</span> <span class="o">=</span> <span class="p">{}</span>

chap14.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ <h2><span class="section-number">14.7. </span>Prototype and patch<a class="heade
913913

914914
<span class="n">carry</span><span class="p">,</span> <span class="n">time</span><span class="o">.</span><span class="n">second</span> <span class="o">=</span> <span class="nb">divmod</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">second</span><span class="p">,</span> <span class="mi">60</span><span class="p">)</span>
915915
<span class="n">carry</span><span class="p">,</span> <span class="n">time</span><span class="o">.</span><span class="n">minute</span> <span class="o">=</span> <span class="nb">divmod</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">minute</span> <span class="o">+</span> <span class="n">carry</span><span class="p">,</span> <span class="mi">60</span><span class="p">)</span>
916-
<span class="n">carry</span><span class="p">,</span> <span class="n">time</span><span class="o">.</span><span class="n">hour</span> <span class="o">=</span> <span class="nb">divmod</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">hour</span> <span class="o">+</span> <span class="n">carry</span><span class="p">,</span> <span class="mi">60</span><span class="p">)</span>
916+
<span class="n">carry</span><span class="p">,</span> <span class="n">time</span><span class="o">.</span><span class="n">hour</span> <span class="o">=</span> <span class="nb">divmod</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">hour</span> <span class="o">+</span> <span class="n">carry</span><span class="p">,</span> <span class="mi">24</span><span class="p">)</span>
917917
</pre></div>
918918
</div>
919919
</div>

chap15.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ <h2> Contents </h2>
370370
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#static-methods">15.3. Static methods</a></li>
371371
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#comparing-time-objects">15.4. Comparing Time objects</a></li>
372372
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-str-method">15.5. The <code class="docutils literal notranslate"><span class="pre">__str__</span></code> method</a></li>
373-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-init-method">15.6. The <strong>init</strong> method</a></li>
373+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-init-method">15.6. The init method</a></li>
374374
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#operator-overloading">15.7. Operator overloading</a></li>
375375
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#debugging">15.8. Debugging</a></li>
376376
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#glossary">15.9. Glossary</a></li>
@@ -735,7 +735,7 @@ <h2><span class="section-number">15.5. </span>The <code class="docutils literal
735735
You can identify them because their names begin and end with two underscores.</p>
736736
</section>
737737
<section id="the-init-method">
738-
<h2><span class="section-number">15.6. </span>The <strong>init</strong> method<a class="headerlink" href="#the-init-method" title="Link to this heading">#</a></h2>
738+
<h2><span class="section-number">15.6. </span>The init method<a class="headerlink" href="#the-init-method" title="Link to this heading">#</a></h2>
739739
<p>The most special of the special methods is <code class="docutils literal notranslate"><span class="pre">__init__</span></code>, so-called because it initializes the attributes of a new object.
740740
An <code class="docutils literal notranslate"><span class="pre">__init__</span></code> method for the <code class="docutils literal notranslate"><span class="pre">Time</span></code> class might look like this:</p>
741741
<div class="cell docutils container">
@@ -1062,7 +1062,7 @@ <h3><span class="section-number">15.10.2. </span>Exercise<a class="headerlink" h
10621062
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#static-methods">15.3. Static methods</a></li>
10631063
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#comparing-time-objects">15.4. Comparing Time objects</a></li>
10641064
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-str-method">15.5. The <code class="docutils literal notranslate"><span class="pre">__str__</span></code> method</a></li>
1065-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-init-method">15.6. The <strong>init</strong> method</a></li>
1065+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-init-method">15.6. The init method</a></li>
10661066
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#operator-overloading">15.7. Operator overloading</a></li>
10671067
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#debugging">15.8. Debugging</a></li>
10681068
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#glossary">15.9. Glossary</a></li>

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)