鉴于昨天被类和函数折腾得晕头转向,今特把类的知识翻出来温习. 1.定义类并创建实力对象 #!/usr/bin/env python # -*- coding:utf-8 -*- __author__ = 'ziv·chan' #定义Person类,并创建出两个实例,打印实例,再比较两个实例是否相等. class Person(object): pass ming = Person() hong = Person() print ming print hong print ming == hong…