Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDowney committed Oct 29, 2024
1 parent 332b8c6 commit 45d4223
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions _sources/chap07.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -114415,7 +114415,11 @@
"cell_type": "code",
"execution_count": 22,
"id": "4a0c46b9",
"metadata": {},
"metadata": {
"tags": [
"raises-exception"
]
},
"outputs": [
{
"ename": "NameError",
Expand Down Expand Up @@ -114933,7 +114937,7 @@
"id": "b2acc611",
"metadata": {},
"source": [
"`uses_only` converts `word` and `letters` to lowercase, so it works with any combination of cases. "
"`uses_any` converts `word` and `letters` to lowercase, so it works with any combination of cases. "
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions chap07.html
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ <h2><span class="section-number">7.3. </span>Updating variables<a class="headerl
</div>
<p>This statement means “get the current value of <code class="docutils literal notranslate"><span class="pre">x</span></code>, add one, and assign the result back to <code class="docutils literal notranslate"><span class="pre">x</span></code>.”</p>
<p>If you try to update a variable that doesn’t exist, you get an error, because Python evaluates the expression on the right before it assigns a value to the variable on the left.</p>
<div class="cell docutils container">
<div class="cell tag_raises-exception docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">z</span> <span class="o">=</span> <span class="n">z</span> <span class="o">+</span> <span class="mi">1</span>
</pre></div>
Expand Down Expand Up @@ -900,7 +900,7 @@ <h2><span class="section-number">7.6. </span>Search<a class="headerlink" href="#
</div>
</div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">uses_only</span></code> converts <code class="docutils literal notranslate"><span class="pre">word</span></code> and <code class="docutils literal notranslate"><span class="pre">letters</span></code> to lowercase, so it works with any combination of cases.</p>
<p><code class="docutils literal notranslate"><span class="pre">uses_any</span></code> converts <code class="docutils literal notranslate"><span class="pre">word</span></code> and <code class="docutils literal notranslate"><span class="pre">letters</span></code> to lowercase, so it works with any combination of cases.</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">uses_any</span><span class="p">(</span><span class="s1">&#39;Banana&#39;</span><span class="p">,</span> <span class="s1">&#39;AEIOU&#39;</span><span class="p">)</span>
Expand Down

0 comments on commit 45d4223

Please sign in to comment.