Skip to content

Commit 7932425

Browse files
committed
Fix error anatomy demo copy
1 parent 2664926 commit 7932425

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

docs/anatomy.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ <h1>Anatomy of a Friendly Error Message</h1>
2525
<div class="anatomy__context-code">
2626
<div>Traceback (most recent call last):</div>
2727
<div>&nbsp;&nbsp;File "main.py", line 2, in &lt;module&gt;</div>
28-
<div>&nbsp;&nbsp;&nbsp;&nbsp;print("Hello, " + nme)</div>
29-
<div>NameError: name 'nme' is not defined</div>
28+
<div>&nbsp;&nbsp;&nbsp;&nbsp;print("Hello, " + firstname)</div>
29+
<div>NameError: name 'firstname' is not defined</div>
3030
</div>
3131
</div>
3232

@@ -40,8 +40,9 @@ <h1>Anatomy of a Friendly Error Message</h1>
4040
</div>
4141
<div class="anatomy__zone-body">
4242
<div class="pfem__title">This variable doesn't exist yet</div>
43-
<div class="pfem__summary">Your code uses the variable "<em>nme</em>", but it hasn't been created yet.
44-
Check line 2. If you meant to print the text <em>nme</em>, put it in double quotes.</div>
43+
<div class="pfem__summary">Your code uses the variable "<em>firstname</em>", but it hasn't been created
44+
yet.
45+
Check line 2. If you meant to print the text <em>firstname</em>, put it in double quotes.</div>
4546
</div>
4647
</div>
4748

@@ -52,7 +53,8 @@ <h1>Anatomy of a Friendly Error Message</h1>
5253
<div class="anatomy__zone-tag">Hint &amp; Direct - Why it happened</div>
5354
</div>
5455
<div class="anatomy__zone-body">
55-
<div class="pfem__why">Without speech marks Python treats <em>nme</em> as a variable, and this variable
56+
<div class="pfem__why">Without speech marks Python treats <em>firstname</em> as a variable, and this
57+
variable
5658
does not exist yet.</div>
5759
</div>
5860
</div>
@@ -65,8 +67,8 @@ <h1>Anatomy of a Friendly Error Message</h1>
6567
</div>
6668
<div class="anatomy__zone-body">
6769
<ul class="pfem__steps">
68-
<li>If it is meant to be text, put speech marks around <em>nme</em>.</li>
69-
<li>If it is meant to be a variable, make it first (for example: <code>nme = 0</code>).</li>
70+
<li>If it is meant to be text, put speech marks around <em>firstname</em>.</li>
71+
<li>If it is meant to be a variable, make it first (for example: <code>firstname = "Jo"</code>).</li>
7072
<li>Check spelling and capital letters.</li>
7173
</ul>
7274
</div>
@@ -79,8 +81,8 @@ <h1>Anatomy of a Friendly Error Message</h1>
7981
<div class="anatomy__zone-tag">Solve - Suggested fix</div>
8082
</div>
8183
<div class="anatomy__zone-body">
82-
<pre class="pfem__patch">nme = 0
83-
print("Hello, " + nme)</pre>
84+
<pre class="pfem__patch">firstname = "Jo"
85+
print("Hello, " + firstname)</pre>
8486
</div>
8587
</div>
8688

0 commit comments

Comments
 (0)