标签:
#!/usr/bin/python class Person: name = ‘jim‘ age = 25 def say(self): print ‘My name is ‘ + self.name + ‘, and age is ‘ + str(self.age) p = Person() p.say() print p.name
python学习笔记十二:类的定义
原文地址:http://www.cnblogs.com/lurenjiashuo/p/python-note-class.html