가을기 Workspace

Python Philosophy - python의 디자인 철학 본문

개발/python

Python Philosophy - python의 디자인 철학

가을기_ 2021. 9. 9. 22:51

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.
(네덜란드 사람(Guido van Rossum)이 아니라면, 처음에 그 방법이 분명하지 않을 수도 있다.)

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!
(네임스페이스는 정말 좋은 아이디어다. 더 많이 사용하자!)

Comments