锘??xml version="1.0" encoding="utf-8" standalone="yes"?>伊人久久无码精品中文字幕,伊人色综合久久天天人守人婷,久久99精品国产一区二区三区http://m.shnenglu.com/volant/category/12076.htmlzh-cnFri, 25 Apr 2014 22:49:39 GMTFri, 25 Apr 2014 22:49:39 GMT60- Python鐨剆taticmethod鍜宑lassmethodhttp://m.shnenglu.com/volant/archive/2014/04/16/206602.html灝忓灝忓Wed, 16 Apr 2014 04:01:00 GMThttp://m.shnenglu.com/volant/archive/2014/04/16/206602.htmlhttp://m.shnenglu.com/volant/comments/206602.htmlhttp://m.shnenglu.com/volant/archive/2014/04/16/206602.html#Feedback0http://m.shnenglu.com/volant/comments/commentRss/206602.htmlhttp://m.shnenglu.com/volant/services/trackbacks/206602.html-----------------
闃呰浠g爜鐨勬椂鍊欙紝鐪嬪埌浜?jiǎn)classmethod銆俿taticmethod鐢ㄧ殑鎸哄錛宑lassmethod涓鐩存病鐢ㄨ繃錛屾劅瑙夋湁浜涜糠鎯戙?br />Google浜?jiǎn)涓綃囨枃绔狅紝璁茬殑鎸烘竻妤氾細(xì)class Base(object):
name = "Base"
@classmethod
def foo(cls):
print cls.name
@staticmethod
def foo_static1():
print Base.name
@staticmethod
def foo_static2(cls):
print cls.name
@staticmethod
def foo_static3(cls):
# if not isinstance(cls, type):
if isinstance(cls, Base):
cls = cls.__class__
print cls.name
class A(Base):
name = "A"
def __init__(self):
self.name = "I am '%s'" % A.name
class B(Base):
name = "B"
def __init__(self):
self.name = "I am '%s'" % B.name
@classmethod
def foo(cls):
print "<%s>" % cls.name
@staticmethod
def foo_static1():
print "<%s>" % Base.name
def testA():
obj = A()
obj.foo()
obj.foo_static1()
obj.foo_static2(A)
obj.foo_static2(obj)
obj.foo_static3(A)
obj.foo_static3(obj)
A.foo()
A.foo_static1()
def testB():
obj = B()
obj.foo()
obj.foo_static1()
def run_test(func, *args, **kwargs):
print "======================="
func(*args, **kwargs)
print ""
if __name__ == '__main__':
run_test(testA)
run_test(testB)

]]> - Python鍐呯疆鍑芥暟--dirhttp://m.shnenglu.com/volant/archive/2009/10/16/98773.html灝忓灝忓Fri, 16 Oct 2009 12:32:00 GMThttp://m.shnenglu.com/volant/archive/2009/10/16/98773.htmlhttp://m.shnenglu.com/volant/comments/98773.htmlhttp://m.shnenglu.com/volant/archive/2009/10/16/98773.html#Feedback0http://m.shnenglu.com/volant/comments/commentRss/98773.htmlhttp://m.shnenglu.com/volant/services/trackbacks/98773.html闃呰鍏ㄦ枃

]]>
亚洲va久久久噜噜噜久久|
久久精品国产精品亜洲毛片
|
久久99精品国产一区二区三区|
日韩欧美亚洲综合久久|
久久这里只有精品首页|
无码久久精品国产亚洲Av影片|
国产精品久久久久天天影视
|
中文成人无码精品久久久不卡
|
成人a毛片久久免费播放|
午夜精品久久影院蜜桃|
久久亚洲精精品中文字幕|
99久久精品国产一区二区|
国产精品久久久久久五月尺|
九九精品99久久久香蕉|
久久久久亚洲AV无码去区首|
久久精品国产免费观看|
AAA级久久久精品无码区|
中文字幕亚洲综合久久菠萝蜜|
亚洲精品无码久久久久久|
91久久精品视频|
久久久久99精品成人片直播|
久久久国产精华液|
国产精品无码久久综合|
久久久噜噜噜久久中文字幕色伊伊
|
国产亚洲精久久久久久无码77777|
久久综合狠狠综合久久综合88|
国产69精品久久久久99|
久久亚洲欧美国产精品|
欧美久久亚洲精品|
日韩亚洲欧美久久久www综合网
|
亚洲国产精品无码久久久秋霞2|
国产日韩久久久精品影院首页|
亚洲va久久久噜噜噜久久|
久久夜色精品国产噜噜亚洲a|
国产激情久久久久影院|
久久er热视频在这里精品|
无码人妻少妇久久中文字幕蜜桃|
亚洲а∨天堂久久精品|
久久精品国产亚洲AV不卡|
日本一区精品久久久久影院|
狠狠色噜噜狠狠狠狠狠色综合久久|