The Zen of Python
The Zen of Python@PEP20とその邦訳版、The Zen of Python@python.jpを見比べてみる。
The Zen of PythonBeautiful 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!
ぶらぼーなアイディア名前空間、やっぱこれですね
私は邦訳版の方から入った口なので、英語の方はちょっと新鮮だったりします。邦訳版の方は少しチャラけてるけど悪くないですね。
ところで "The Zen of Python" はなんて訳せば良いのかな?