Message950
When defining a class that overloads the __str__
method and raises an exception in the overloaded
method, for example
class C:
def __str__(self):
raise Exception("i am an exception")
If we call str on an object of this class the exception will
not be raised
x=C()
str(x)
(no exception will be reported by jython)
P.S.
when using x.__str__() the exception will be raised and
jython will display it
|
|
Date |
User |
Action |
Args |
2008-02-20 17:17:21 | admin | link | issue1149372 messages |
2008-02-20 17:17:21 | admin | create | |
|