#!/usr/bin/env python class People(object): color = ‘yellow‘ def info(self): print "hello world!" print ‘I am a %s‘ % self.color ren = People() ren.info()
Python-面向对象
原文:http://www.cnblogs.com/dachenzi/p/6107448.html