新聞中心
python查看文檔的方式有哪些?這個(gè)問題可能是我們?nèi)粘W(xué)習(xí)或工作經(jīng)常見到的。希望通過這個(gè)問題能讓你收獲頗深。下面是小編給大家?guī)淼膮⒖純?nèi)容,讓我們一起來看看吧!
成都創(chuàng)新互聯(lián)是一家集網(wǎng)站建設(shè),凌源企業(yè)網(wǎng)站建設(shè),凌源品牌網(wǎng)站建設(shè),網(wǎng)站定制,凌源網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷,網(wǎng)絡(luò)優(yōu)化,凌源網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力。可充分滿足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。
help
在交互模式下,help函數(shù)是獲取文檔的好幫手,使用非常簡(jiǎn)單。
>>> import struct >>> help(struct) Help on module struct: NAME struct DESCRIPTION Functions to convert between Python values and C structs. Python bytes objects are used to hold the data representing the C struct and also as format strings (explained below) to describe the layout of data in the C struct. The optional first format char indicates byte order, size and alignment: @: native order, size & alignment (default) =: native order, std. size & alignment <: little-endian, std. size & alignment >: big-endian, std. size & alignment !: same as > The remaining chars indicate types of args and must match exactly; these can be preceded by a decimal repeat count: x: pad byte (no data); c:char; b:signed byte; B:unsigned byte; ?: _Bool (requires C99; if not available, char is used instead) h:short; H:unsigned short; i:int; I:unsigned int;
__doc__
__doc__是每個(gè)對(duì)象都有的屬性,其存放了對(duì)象文檔。
>>> import struct >>> struct.__doc__ "Functions to convert between Python values and C structs.\nPython bytes objects are used to hold the data representing the C struct\nand also as format string s (explained below) to describe the layout of data\nin the C struct.\n\nThe optional first format char indicates byte order, size and alignment:\n @: native o rder, size & alignment (default)\n =: native order, std. size & alignment\n <: little-endian, std. size & alignment\n >: big-endian, std. size & alignment\n !: same as >\n\nThe remaining chars indicate types of args and must match exactly;\nthese can be preceded by a decimal repeat count:\n x: pad byte (no data) ; c:char; b:signed byte; B:unsigned byte;\n ?: _Bool (requires C99; if not available, char is used instead)\n h:short; H:unsigned short; i:int; I:unsigned in t;\n l:long; L:unsigned long;
離線文檔
安裝Python時(shí)會(huì)自帶一個(gè)chm格式的離線文檔Python documention,該文檔的信息比較全。
離線模塊文檔
Python針對(duì)模塊還有一個(gè)單獨(dú)的文檔,該文檔在瀏覽器中查看。
在線文檔
在瀏覽器打開https://docs.python.org/3.4/
感謝各位的閱讀!看完上述內(nèi)容,你們對(duì)python查看文檔的方式有哪些大概了解了嗎?希望文章內(nèi)容對(duì)大家有所幫助。如果想了解更多相關(guān)文章內(nèi)容,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。
當(dāng)前文章:python查看文檔的方式有哪些
文章分享:http://fisionsoft.com.cn/article/pjecjg.html