First page Back Continue Last page Summary Graphics

Little Static (Compile-Time) Error Checking

  • Remember this code:
  • try:
  • print '5' + 5
  • except TypeError:
  • print "You can't add an integer to a string"
  • This is a runtime error not a compile-time error
  • The following code works:
  • print '5' * 5
  • 55555 is printed

    Notes: