Why there is a parameter named "self" for classmethod function?

2009-05-06 Thread Jianchun Zhou
Hi, ALL: I have a sample code as bellow: #!/usr/bin/env python class Hello: def __init__(self): print "Hello __init__" @classmethod def print_hello(self): print "hello" Hello.print_hello() If I move "self" parameter of print_hello away, this code fragment won't work

Can not run under python 2.6?

2009-04-28 Thread Jianchun Zhou
Hi, there: I am new to python, and now I got a trouble: I have an application named canola, it is written under python 2.5, and can run normally under python 2.5 But when it comes under python 2.6, problem up, it says: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/