想通了,現(xiàn)列出個(gè)人的看法作為python的源對(duì)象,object是所有類(lèi)對(duì)象的祖先(base)包括另一個(gè)源對(duì)象type。其實(shí)__new__方法的第一個(gè)參數(shù)只是恰好設(shè)置成了cls,并非要綁定某個(gè)實(shí)例對(duì)象,所以可以這么回答是靜態(tài)方法,因?yàn)開(kāi)_new__()在這里只是一個(gè)綁定源對(duì)象object的普通方法,常規(guī)意義下__new__()的確是類(lèi)方法不是,所有的靜態(tài)方法都只是綁定類(lèi)對(duì)象或者實(shí)例對(duì)象的普通方法沒(méi)有,實(shí)際上是把cls這個(gè)普通的positionargument和類(lèi)方法當(dāng)中的代表類(lèi)對(duì)象的clspositionargument混淆了需要補(bǔ)充的是,源對(duì)象類(lèi)型的實(shí)例也是類(lèi),是可以進(jìn)一步實(shí)例化的,常常作為某些框架的基礎(chǔ)數(shù)據(jù)類(lèi)型描述符,可以進(jìn)行強(qiáng)制類(lèi)型檢查,比如django的ORM的ModelBase,作為metaclass被所有model繼承,涉及元編程的一些東西附上官方文檔的解釋?zhuān)约皊tackoverflow一些對(duì)這個(gè)東西的討論,很清晰,看來(lái)還是多看官方文檔更有用1.documentationobject.__new__(cls[,...])Calledtocreateanewinstanceofclasscls.__new__()isastaticmethod(special-casedsoyouneednotdeclareitassuch)thattakestheclassofwhichaninstancewasrequestedasitsfirstargument.Theremainingargumentsarethosepassedtotheobjectconstructorexpression(thecalltotheclass).Thereturnvalueof__new__()shouldbethenewobjectinstance(usuallyaninstanceofcls).Typicalimplementationscreateanewinstanceoftheclassbyinvokingthesuperclass’s__new__()methodusingsuper().__new__(cls[,...])withappropriateargumentsandthenmodifyingthenewly-createdinstanceasnecessarybeforereturningit.If__new__()returnsaninstanceofcls,thenthenewinstance’s__init__()methodwillbeinvokedlike__init__(self[,...]),whereselfisthenewinstanceandtheremainingargumentsarethesameaswerepassedto__new__().If__new__()doesnotreturnaninstanceofcls,thenthenewinstance’s__init__()methodwillnotbeinvoked.__new__()isintendedmainlytoallowsubclassesofimmutabletypes(likeint,str,ortuple)tocustomizeinstancecreation.Itisalsocommonlyoverriddenincustommetaclassesinordertocustomizeclasscreation.2.StackOverflow的討論