English subtitles

← Assertions in Python - Software Debugging

Get Embed Code
4 Languages

Showing Revision 3 created 05/24/2016 by Udacity Robot.

  1. Now, compare the level of diagnostic output we've seen in C and C++
  2. with the amount of diagnostic output you get in Python.
  3. If you write assert 2+2=5 as condition that evaluates the form.
  4. So which information does one get from a failing Python assertion.
  5. Do you get the failing assertion condition. In our case, 2+2=5.
  6. The location of the assertion in the program. In our case, line 1.
  7. The location of the defect in the code or the list of callers. Try it out for yourself, over to you.