2014-01-13 17:19:16 +00:00
|
|
|
print(repr(IndexError()))
|
|
|
|
print(str(IndexError()))
|
|
|
|
|
|
|
|
print(str(IndexError("foo")))
|
|
|
|
|
2014-01-15 21:40:48 +00:00
|
|
|
a = IndexError(1, "test", [100, 200])
|
|
|
|
print(repr(a))
|
2014-01-15 22:39:03 +00:00
|
|
|
print(str(a))
|
2014-03-24 23:29:09 +00:00
|
|
|
print(a.args)
|
|
|
|
|
|
|
|
s = StopIteration()
|
|
|
|
print(s.value)
|
|
|
|
s = StopIteration(1, 2, 3)
|
|
|
|
print(s.value)
|