锘??xml version="1.0" encoding="utf-8" standalone="yes"?>伊人久久无码精品中文字幕,伊人色综合久久天天人守人婷,久久99精品国产一区二区三区http://www.shnenglu.com/volant/category/12076.htmlzh-cnFri, 25 Apr 2014 22:49:39 GMTFri, 25 Apr 2014 22:49:39 GMT60- Python鐨剆taticmethod鍜宑lassmethodhttp://www.shnenglu.com/volant/archive/2014/04/16/206602.html灝忓灝忓Wed, 16 Apr 2014 04:01:00 GMThttp://www.shnenglu.com/volant/archive/2014/04/16/206602.htmlhttp://www.shnenglu.com/volant/comments/206602.htmlhttp://www.shnenglu.com/volant/archive/2014/04/16/206602.html#Feedback0http://www.shnenglu.com/volant/comments/commentRss/206602.htmlhttp://www.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://www.shnenglu.com/volant/archive/2009/10/16/98773.html灝忓灝忓Fri, 16 Oct 2009 12:32:00 GMThttp://www.shnenglu.com/volant/archive/2009/10/16/98773.htmlhttp://www.shnenglu.com/volant/comments/98773.htmlhttp://www.shnenglu.com/volant/archive/2009/10/16/98773.html#Feedback0http://www.shnenglu.com/volant/comments/commentRss/98773.htmlhttp://www.shnenglu.com/volant/services/trackbacks/98773.html闃呰鍏ㄦ枃

]]>
香蕉久久久久久狠狠色|
国内精品久久久久久久久电影网
|
一级做a爰片久久毛片人呢|
久久久久久久久无码精品亚洲日韩
|
中文字幕人妻色偷偷久久|
无码人妻久久一区二区三区免费|
久久99精品久久只有精品|
久久精品成人免费观看97|
亚洲∧v久久久无码精品|
久久精品男人影院|
激情综合色综合久久综合|
久久久久精品国产亚洲AV无码|
91精品国产91久久久久久青草
|
久久久久亚洲精品中文字幕|
91麻豆国产精品91久久久|
亚洲AV日韩精品久久久久|
国产精品久久久久久久久免费|
久久香蕉一级毛片|
777米奇久久最新地址|
亚洲精品久久久www|
久久精品国产99国产电影网|
伊人热热久久原色播放www|
久久精品国产秦先生|
久久午夜福利无码1000合集|
91精品国产91久久久久久青草|
色婷婷综合久久久中文字幕|
国产精品中文久久久久久久
|
亚洲精品无码久久久影院相关影片|
国产精品99久久久久久董美香
|
精品国产日韩久久亚洲|
亚洲国产精品久久66|
久久精品9988|
国产精品成人无码久久久久久|
久久精品欧美日韩精品|
一本一本久久A久久综合精品|
久久婷婷人人澡人人|
久久九九久精品国产免费直播|
日本精品久久久久中文字幕8
|
久久亚洲精品无码AV红樱桃|
日本WV一本一道久久香蕉|
久久精品人妻中文系列|