2020-07-16 | Paul Boddie | file changeset files shortlog | Fixed int limit macros by actually using the size of the int type. For wider types such as long, which may be usable on 64-bit platforms in place of int, 1L would need to be used instead of 1 in the calculation. An abstract native integer type might be introduced here and to the native library to allow wider types if appropriate. |
paul@321 | 1 | # Raise an instance of TypeError. |
paul@321 | 2 | |
paul@321 | 3 | try: |
paul@321 | 4 | raise TypeError() |
paul@321 | 5 | except TypeError, exc: |
paul@321 | 6 | print "Handled", exc |
paul@321 | 7 | |
paul@321 | 8 | # Raise TypeError, causing instantiation. |
paul@321 | 9 | |
paul@321 | 10 | try: |
paul@321 | 11 | raise TypeError |
paul@321 | 12 | except TypeError, exc: |
paul@321 | 13 | print "Handled", exc |