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

파이썬의 선(禪, The Zen of Python): 우아한 코드를 위한 19가지 시대를 초월한 원칙 (PEP-20)

파이썬의 선(禪, The Zen of Python): 우아한 코드를 위한 19가지 시대를 초월한 원칙 (PEP-20)

가장 초기 파이썬 PEP 중 하나가 PEP-20. 파이썬 프로그래밍 관련 19개 테제 나열, '파이썬의 선(The Zen of Python)'이라 불림. 이 규칙들 2004년 거슬러 올라가며 PEP-8 기반.

파이썬 오래 전부터 이스터 에그로 이 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!

파이썬 REPL만 있으면 언제든 이 규칙들 화면에 띄울 수 있습니다!

python

  1. 파이썬 데이터 타입 마스터하기: 실전 가이드
  2. 파이썬 연산자 마스터하기: 종합 가이드
  3. Python 리스트 연산: 생성, 접근, 수정, 고급 기법
  4. Python 딕셔너리 마스터하기: 생성, 조작, 고급 기법
  5. 수익화된 공격이 새 위협 낳는다: 전문가 보안 대응 단계
  6. 커넥티드 카가 차량 안전과 유지보수를 혁신하는 방식
  7. 공급망 미래대비: 회복탄력성과 성장을 위한 전략
  8. 팬데믹 속 필수 물자 공동 조달: 병원·GHX·AHRMM·NGA 협력 모델
  9. B&R 맵 모션(Mapp Motion), 고급 구성 기능으로 로봇 성능 강화
  10. IoT가 HVAC를 혁신하는 5가지 핵심 방법