PEP 20 -- The Zen of Python

发布时间:2019-07-02 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了PEP 20 -- The Zen of Python脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

共勉

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!

彩蛋

>>> import this

脚本宝典总结

以上是脚本宝典为你收集整理的PEP 20 -- The Zen of Python全部内容,希望文章能够帮你解决PEP 20 -- The Zen of Python所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。