码迷,mamicode.com
首页 >  
搜索关键字:__builtin__    ( 266个结果
python内置函数5-getattr()
Helponbuilt-infunctiongetattrinmodule__builtin__:getattr(...)getattr(object,name[,default])->valueGetanamedattributefromanobject;getattr(x,‘y‘)isequivalenttox.y.Whenadefaultargumentisgiven,itisreturnedwhentheattributedoesn‘texist;withoutit,anexceptionisr..
分类:编程语言   时间:2017-02-22 15:26:56    阅读次数:184
python内置函数4-eval()
Helponbuilt-infunctionevalinmodule__builtin__:eval(...)eval(source[,globals[,locals]])->valueEvaluatethesourceinthecontextofglobalsandlocals.ThesourcemaybeastringrepresentingaPythonexpressionoracodeobjectasreturnedbycompile().Theglobalsmustbeadictionarya..
分类:编程语言   时间:2017-02-21 20:01:21    阅读次数:223
python内置函数4-file()
Helponclassfileinmodule__builtin__:classfile(object)|file(name[,mode[,buffering]])->fileobject||Openafile.Themodecanbe‘r‘,‘w‘or‘a‘forreading(default),|writingorappending.Thefilewillbecreatedifitdoesn‘texist|whenopenedforwritingorappending;itwillbetruncat..
分类:编程语言   时间:2017-02-21 19:57:49    阅读次数:164
python内置函数3-complex()
Helponclasscomplexinmodule__builtin__:classcomplex(object)|complex(real[,imag])->complexnumber||Createacomplexnumberfromarealpartandanoptionalimaginarypart.|Thisisequivalentto(real+imag*1j)whereimagdefaultsto0.||Methodsdefinedhere:||__abs__(...)|x.__abs_..
分类:编程语言   时间:2017-02-20 23:29:17    阅读次数:239
python内置函数3-dir()
Helponbuilt-infunctiondirinmodule__builtin__:dir(...)dir([object])->listofstringsIfcalledwithoutanargument,returnthenamesinthecurrentscope.Else,returnanalphabetizedlistofnamescomprising(someof)theattributesofthegivenobject,andofattributesreachablefromit...
分类:编程语言   时间:2017-02-20 23:25:00    阅读次数:264
python内置函数2-callable()
Helponbuilt-infunctioncallableinmodule__builtin__:callable(...)callable(object)->boolReturnwhethertheobjectiscallable(i.e.,somekindoffunction).Notethatclassesarecallable,asareinstanceswitha__call__()method. callable(object)ReturnTrueiftheobjectargumentap..
分类:编程语言   时间:2017-02-17 01:00:24    阅读次数:180
python内置函数2-classmethod()
Helponclassclassmethodinmodule__builtin__:classclassmethod(object)|classmethod(function)->method||Convertafunctiontobeaclassmethod.||Aclassmethodreceivestheclassasimplicitfirstargument,|justlikeaninstancemethodreceivestheinstance.|Todeclareaclassmethod,u..
分类:编程语言   时间:2017-02-17 00:59:35    阅读次数:205
python内置函数1-abs()
Helponbuilt-infunctionabsinmodule__builtin__:abs(...)abs(number)->numberReturntheabsolutevalueoftheargument.abs(x)Returntheabsolutevalueofanumber.Theargumentmaybeaplainorlongintegerorafloatingpointnumber.Iftheargumentisacomplexnumber,itsmagnitudeisreturn..
分类:编程语言   时间:2017-02-14 23:00:04    阅读次数:174
python内置函数1-any()
Helponbuilt-infunctionanyinmodule__builtin__:any(...)any(iterable)->boolReturnTrueifbool(x)isTrueforanyxintheiterable. any(iterable)ReturnTrueifanyelementoftheiterableistrue.Iftheiterableisempty,returnFalse.Equivalentto:defany(iterable):forelementinitera..
分类:编程语言   时间:2017-02-14 22:58:21    阅读次数:554
python内置函数1-basestring()
Helponclassbasestringinmodule__builtin__:classbasestring(object)|Typebasestringcannotbeinstantiated;itisthebaseforstrandunicode.||Dataandotherattributesdefinedhere:||__new__=<built-inmethod__new__oftypeobject>|T.__new__(S,...)->anewobjectwithtypeS,..
分类:编程语言   时间:2017-02-14 22:56:44    阅读次数:454
266条   上一页 1 ... 12 13 14 15 16 ... 27 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!