프로젝트에 참여했다면 프로젝트에서 정의된 코딩 가이드라인을 따름

코딩 가이드라인이 없는경우 PEP 8 참고. 단, 똑같이 따라할 필요는 없을듯.

일관된 코딩스타일을 구축하는게 중요함.

PEP 8 is the de facto code style guide for Python. A high quality, easy-to-read version of PEP 8 is also available at pep8.org.

 

>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!

 

The Hitchhiker's Guide to Python

https://docs.python-guide.org/writing/style/

728x90

'다시시작하는 > PYTHON' 카테고리의 다른 글

pandas 설치  (0) 2020.01.30
데이터 분석을 위한 panda-profiling  (0) 2020.01.15
파이썬 팁 30  (0) 2020.01.06

+ Recent posts