ised which though deprecated
but still a 3rd party library I use uses it. So how can I catch such
exception without relying on catch all, which could be bad.
system: Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3
(Ubuntu 4.2.3-2ubuntu7)] on linux2
Try this, i.e. catch the exact string:
s such as:
@classmethod
def print_hello(cls):
print "hello"
But you might consider decorating the method as a static method instead
since in your example you are not using the parameter at all. A static
method would not require a parameter.
@staticmethod
def print_h