8f0147cf00
In Python 3.7 the behaviour of repr() of an exception with one argument changed: it no longer prints a trailing comma in the argument list. See https://bugs.python.org/issue30399 This patch modifies tests that rely on this behaviour to not rely on it. And the python34.py test is updated to include a test for this behaviour with a .exp file.
15 lines
242 B
Python
15 lines
242 B
Python
print(repr(IndexError()))
|
|
print(str(IndexError()))
|
|
|
|
print(str(IndexError("foo")))
|
|
|
|
a = IndexError(1, "test", [100, 200])
|
|
print(repr(a))
|
|
print(str(a))
|
|
print(a.args)
|
|
|
|
s = StopIteration()
|
|
print(s.value)
|
|
s = StopIteration(1, 2, 3)
|
|
print(s.value)
|