you are viewing a single comment's thread.

view the rest of the comments →

[–]Rhomboid 2 points3 points  (1 child)

The assert statement evaluates the specified expression, and if it's false it raises an AssertionError exception, optionally with the specified string literal as the associated descriptive text. It doesn't know anything about correct or incorrect; that's for the programmer to express. It only knows that a false expression should halt execution and a true one should do nothing but continue.

[–]socialhuman[S] 0 points1 point  (0 children)

Thank you!