Skip to content

Commit 34c7394

Browse files
[7.4.x] doc: update information about assertion messages (#11286)
Co-authored-by: Christoph Anton Mitterer <[email protected]>
1 parent 350122a commit 34c7394

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

doc/en/how-to/assert.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,13 @@ operators. (See :ref:`tbreportdemo`). This allows you to use the
5454
idiomatic python constructs without boilerplate code while not losing
5555
introspection information.
5656

57-
However, if you specify a message with the assertion like this:
57+
If a message is specified with the assertion like this:
5858

5959
.. code-block:: python
6060
6161
assert a % 2 == 0, "value was odd, should be even"
6262
63-
then no assertion introspection takes places at all and the message
64-
will be simply shown in the traceback.
63+
it is printed alongside the assertion introspection in the traceback.
6564

6665
See :ref:`assert-details` for more information on assertion introspection.
6766

0 commit comments

Comments
 (0)