""" lectureNote/chapters/chapt05/codes/pdb_example.py """ def division_by_zero(x): x /= x-1 # equiv. to x = x/(x-1) return x # import pdb for i in range(5,0,-1): # pdb.set_trace() soln = division_by_zero(float(i))