본문 바로가기

Python_Beginer/Study

[PEP 20]The Zen of Python

반응형

 파이썬 이스트에그

 

⊙ 사용 방법

 

import this

 

⊙ 사이트

https://www.python.org/dev/peps/pep-0020/

 

PEP 20 -- The Zen of Python

The official home of the Python Programming Language

www.python.org

 

⊙ 내용

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.

(그것을 할 수 있는 확실한 방법이 하나 있어야 한다.

비록 당신이 네덜란드인이 아니라면 처음에는 그렇게 명백하지 않을 수도 있다.)
Now is better than never.

(지금은 없는 것보다는 낫다.)
Although never is often better than *right* now.

(비록 지금은 결코 *right*보다 낫지는 않지만.)
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!

(네임스페이스는 멋진 아이디어 중 하나이다. 더 많은 것을 하자!)

반응형

'Python_Beginer > Study' 카테고리의 다른 글

[HandCoding]손코딩 테스트  (0) 2020.01.19
[Flake 8]Flake 8  (0) 2019.12.28
HRD 수업>파이썬을 이용한 자동화 스크립트 - Ch19  (0) 2019.08.21
CSV to Dict(CSV File -> Dict)  (0) 2019.08.10
List to CSV(List -> CSV File)  (0) 2019.08.10