1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > 什么代码风格算是python风格 – java – 前端 python 列表元素合并

什么代码风格算是python风格 – java – 前端 python 列表元素合并

时间:2019-01-28 01:20:07

相关推荐

什么代码风格算是python风格 – java – 前端 python 列表元素合并

做为一个程序员,要做到码如其人,人码合一。

坚持python之禅,生活快乐无边!

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.哪怕这个方法在开始的时候可能并不明显 —除非你是python老爹本人;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!命名空间是个好玩意,能多用就多用吧,别控制!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。