摘要: http://hi.baidu.com/thinkinginlamp/blog/item/8905564e1f771c0eb3de05ec.html如何在Python中调用父类的同名方法2009年02月05日 星期四 下午 3:38作者:老王Python中对象方法的定义很怪异,第一个参数一般都命名为self(相当于其它语言的this),用于传递对象本身,而在调用的时候则不必显式传递,系统会自动传递。举一个很常见的例子:>>> class Foo: def bar(self, message): print(message)>>> Foo().bar(&quo 阅读全文
posted @ 2012-02-29 13:08 bettermanlu 阅读(272) 评论(0) 推荐(0) 编辑