본문 바로가기

Python

[Python] 파이썬의 이스터 에그

import this

위의 코드를 이용하면 이스터 에그를 볼 수 있다. 

나오는 내용은 파이썬의 철학인데 캐치 프레이징이 꽤나 좋다.

아래에 그 내용을 간단히 싣는다.

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.
  • 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' 카테고리의 다른 글

[Python] VSCode에서 파이썬 가상환경(venv) 사용하기  (0) 2022.08.11