]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
simplify
authorBenjamin Peterson <benjamin@python.org>
Wed, 22 Jul 2009 00:03:43 +0000 (00:03 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 22 Jul 2009 00:03:43 +0000 (00:03 +0000)
Doc/reference/simple_stmts.rst

index 6f0f1f12eb2d9b17d229a44b6a524a279318bf4e..572bd485146478a327de228c0231f6acfd82e540 100644 (file)
@@ -282,13 +282,13 @@ program:
 
 The simple form, ``assert expression``, is equivalent to ::
 
-   if __debug__:
-      if not expression: raise AssertionError
+   if __debug__ and not expression:
+       raise AssertionError
 
 The extended form, ``assert expression1, expression2``, is equivalent to ::
 
-   if __debug__:
-      if not expression1: raise AssertionError(expression2)
+   if __debug__ and not expression1:
+       raise AssertionError(expression2)
 
 .. index::
    single: __debug__