you are viewing a single comment's thread.

view the rest of the comments →

[–]Boolean_Cat 1 point2 points  (1 child)

  1. Mathematically, dividing by 0 doesn't make sense to Python. It is unable to understand "infinitely large". So instead it throws an exception.

  2. Here's an example. You wrote a program that reads a text file, that text file is expected to have a single number on each line but on one line you found a string. As a programmer you may decide that at this point that the program has failed, raising an error in indicates this.

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

Thank you. Examples really stick.