산업 제조
산업용 사물 인터넷 | 산업자재 | 장비 유지 보수 및 수리 | 산업 프로그래밍 |
home  MfgRobots >> 산업 제조 >  >> Industrial programming >> python

Zen of Python(PEP-20 부활절 달걀)

초기 Python pep 중 하나는 PEP-20입니다. 'The Zen of Python'이라는 Python 프로그래밍과 관련된 19개의 논문 목록입니다. 이 규칙은 2004년으로 거슬러 올라가며 PEP-8을 기반으로 합니다.

오랫동안 Python에 존재해 온 작은 부활절 달걀은 다음 19가지 규칙을 나열합니다.

>>> 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 REPL이 있는 한 이러한 규칙을 화면에 표시할 수 있습니다!


python

  1. 파이썬 데이터 유형
  2. 파이썬 연산자
  3. 파이썬 목록
  4. 파이썬 사전
  5. IoT를 더 잘 이해하려면 어떻게 해야 합니까?
  6. Zen과 자동 자동차 정비의 기술
  7. 미래를 위한 더 나은 공급망 구축
  8. 미지의 소싱:함께 하면 더 좋습니다
  9. B&R 소프트웨어는 로봇의 잠재력을 더 잘 활용합니다
  10. IoT가 HVAC를 개선한 5가지 방법