Kurt Symanzik wrote:
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_hello():
print "hello"
Functions that refer to neither the class nor an instance thereof can
usually be moved outside the class altogether. Python is not Java. I
believe staticmethod() was mainly added because it is needed for
.__new__(), at least in some appearances.
tjr
--
http://mail.python.org/mailman/listinfo/python-list