官术网_书友最值得收藏!

每種計算機語言都有自己的風格。我在前言中提到過,可以使用Python化的方式來表達自我。Python中內置了一些自由體詩歌,簡單明了地傳遞了Python的哲學(據我所知,Python是唯一一種包含這種彩蛋程序的語言)。只要在交互式解釋器中輸入import this,然后按下回車鍵就能看到如下內容:

>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one--and preferably only one--obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea--let's do more of those!

我會將這些哲學貫穿全書。

主站蜘蛛池模板: 双流县| 彩票| 登封市| 巴彦县| 保山市| 五莲县| 乡城县| 时尚| 马鞍山市| 茂名市| 彭水| 广宗县| 泾川县| 元朗区| 禹城市| 卓资县| 巫山县| 陕西省| 合水县| 贵州省| 灵寿县| 安康市| 达日县| 阿图什市| 桓台县| 巴南区| 民县| 邓州市| 黄山市| 大港区| 铅山县| 青海省| 青川县| 泰顺县| 台湾省| 盱眙县| 南木林县| 原阳县| 花莲县| 陈巴尔虎旗| 望奎县|