Skip to content

Commit 3cb4157

Browse files
melosa11johnbartholomew
authored andcommitted
docs: fix assertion example with correct condition
From the context of the text, the `assert` condition should include a field property above.
1 parent 8aedd19 commit 3cb4157

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/learning/tutorial.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ <h2 id="errors">Errors</h2>
493493
<li>To assert a condition before an expression: <code>assert "foo";</code></li>
494494
<li>A custom failure message: <code>assert "foo" : "message";</code></li>
495495
<li>Assert fields have a property: <code>assert self.f == 10,</code></li>
496-
<li>With custom failure message: <code>assert "foo" : "message",</code></li>
496+
<li>With custom failure message: <code>assert self.f == 10 : "message",</code></li>
497497
</ul>
498498
<p>
499499
Try modifying the code below to trigger the assertion failures, and observe the error

0 commit comments

Comments
 (0)