新聞中心
1、說(shuō)明

成都創(chuàng)新互聯(lián)公司是一家集網(wǎng)站建設(shè),富陽(yáng)企業(yè)網(wǎng)站建設(shè),富陽(yáng)品牌網(wǎng)站建設(shè),網(wǎng)站定制,富陽(yáng)網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷,網(wǎng)絡(luò)優(yōu)化,富陽(yáng)網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。
python之禪指的是Tim Peters 編寫的關(guān)于python編程準(zhǔn)則。
2、操作步驟
在python的交互界面輸入import this,回車,會(huì)發(fā)現(xiàn)返回了一些代碼規(guī)范。
3、代碼
>>> import this The Zen of Python, by Tim Peters蟒宗之禪語(yǔ),提姆彼得斯(中文是我加的,參考了幾種網(wǎng)上的譯文) Beautiful is better than ugly.優(yōu)美勝于丑陋 Explicit is better than implicit.明白勝于晦暗 Simple is better than complex.簡(jiǎn)潔勝于繁復(fù) Complex is better than complicated.繁復(fù)勝于艱深 Flat is better than nested.扁平勝于嵌套 Sparse is better than dense.松散勝于聚集 Readability counts.代碼確保易讀 Special cases aren't special enough to break the rules.規(guī)則拒絕特例 Although practicality beats purity.實(shí)用不求純凈 Errors should never pass silently.錯(cuò)誤不可放過(guò) Unless explicitly silenced.除非明確理由 In the face of ambiguity, refuse the temptation to guess. 模棱兩可之間,不要隨意猜測(cè) There should be one-- and preferably only one --obvious way to do it.必有唯一選擇,明顯勝過(guò)其余 Although that way may not be obvious at first unless you're Dutch.起初無(wú)法分辨,只因你非大神 Now is better than never.嘗試好過(guò)放棄 Although never is often better than *right* now.但須謀定而動(dòng) If the implementation is hard to explain, it's a bad idea.實(shí)現(xiàn)難以解釋,定是糟糕方案 If the implementation is easy to explain, it may be a good idea.實(shí)現(xiàn)易于解釋,或?yàn)榱己梅桨? Namespaces are one honking great idea -- let's do more of those!名稱空間極好,諸君多加使用!
以上就是python之禪的介紹,希望對(duì)想要學(xué)習(xí)python的人有所幫助。更多Python學(xué)習(xí)指路:創(chuàng)新互聯(lián)python教程
(推薦操作系統(tǒng):windows7系統(tǒng)、Python 3.9.1,DELL G3電腦。)
文章題目:創(chuàng)新互聯(lián)Python教程:python之禪是什么
分享鏈接:http://fisionsoft.com.cn/article/ccscepd.html


咨詢
建站咨詢
