-
python类方法和普通方法区别
python类方法和普通方法区别下面用例子的方式,说明其区别。首先, 定义一个类,包括2个方法:class Apple(object):def get_apple(self, n):print "apple: %s,%s"
python类方法和普通方法区别下面用例子的方式,说明其区别。首先, 定义一个类,包括2个方法:class Apple(object):def get_apple(self, n):print "apple: %s,%s"