项目作者: paul-wolf

项目描述 :
python coding guidelines
高级语言: Python
项目地址: git://github.com/paul-wolf/python_coding.git
创建时间: 2021-01-26T07:48:12Z
项目社区:https://github.com/paul-wolf/python_coding

开源协议:Creative Commons Zero v1.0 Universal

下载


Python Coding Guidelines

This is a set of guidelines to make Python code more readable, easier to
maintain and easier to reuse. This repository is the source code for the site
hosted here:

https://python-coding-guidelines.readthedocs.io

The concentration is on sound coding rather than big issues around
architecture. We don’t pay much attention to how to make code faster.
We’re more interested in the process of efficient code production and
code maintenance. Writing idiomatic Python is a sound basis for
efficient code.

If you struggle with too many bugs and maintanance problems in your
project, applying the following recommendations might have a big
positive effect. The intent is to bring together many well-known good
practices in a checklist form to provide a toolkit for code reviews.
This is not an authoritative set of prescriptions. It’s a starting point
for developing your own set of guidelines. Discard or modify practices
as you see fit.

You’ll need to be familiar with Python to some extent since we won’t
explain basics of the language. But there are helpful references in the
appendix especially for common design patterns. If you are not familiar
with some parts of Python like how modules and packages work, you’ll
need to read up in the Python Standard Library documentation <https://docs.python.org>_.

Most of this material is applicable to most Python versions but we
assume a more or less current version like 3.7 or even higher.