The Zen of Python

The Zen of Python@PEP20とその邦訳版、The Zen of Python@python.jpを見比べてみる。


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!
ぶらぼーなアイディア名前空間、やっぱこれですね

私は邦訳版の方から入った口なので、英語の方はちょっと新鮮だったりします。邦訳版の方は少しチャラけてるけど悪くないですね。
ところで "The Zen of Python" はなんて訳せば良いのかな?