Object() takes no parameters of Python errors

Detailed map traversal, teach you to master the complex gremlin query debugging method>>>

'''
Createdon2016��4��26��
@author:zf
'''
classHello:
#���췽��_init_
def_init_(self,name):
self.name=name
defsayHello(self):
print("Hello{0}".format(self.name))

h=Hello("Python")
h.sayHello()

There was an error in object() takes no parameters when running. I didn’t find it at first, then I found it__ init__ ( CTRL +/verify is double dash, I only use one dash)

Reference blog: http://blog.csdn.net/liyajuan521/article/details/44409877

Similar Posts: