规范基本内容 PEP 8 的英文全称为 Style Guide for Python Code ,即 Python 编码风格指南(或称规范),这份指南涵盖三个大的方面,代码布局、注释文档以及命名规范 代码的整体布局,比如缩进、行最大长度、换行与空行、导入语句的位置及组织结构、编码声明、dunder 方法位置等; 代码中的引号以及空格、行尾部逗号; 复合...
High-Quality Code Now, here’s an extended list of the key characteristics that define high-quality code: Functionality: Works as expected and fulfills its intended purpose. Readability: Is easy for humans to understand. Documentation: Clearly explains its purpose and usage. Standards Compliance: ...
This is the style guide that describes the coding standards for code to be included in the Python standard library. I encourage you to read that entire document, but you are only responsible for the boxed (and edited) excerpts included on this page. I also recommend taking a look at ...
One of Guido's key insights is that code is read much more often than it is written. The guidelines provided here are intended to improve the readability of code and make it consistent across the wide spectrum of Python code. AsPEP 20says, "Readability counts". A style guide is about co...
If not, then start there. If you have some documentation but are missing some of the key project files, get started by adding those. In the end, don’t get discouraged or overwhelmed by the amount of work required for documenting code. Once you get started documenting your code, it becom...
This document gives coding conventions for the Python code comprising the standard library in the main Python distribution. Please see the companion informational PEP describing style guidelines for the C code in the C implementation of Python [1] . 本文提供的编码规范用于Python主发行版中的标准库的...
It allows to write tests directly within the documentation strings (docstrings) of your functions, classes, and modules. Doctest offers a unique feature i.e., documentation testing. In other words, it allows you to test whether your code documentation is up-to-date or not. This becomes especi...
Pyright is a full-featured, standards-based static type checker for Python. It is designed for high performance and can be used with large Python source bases. Pyright includes both a command-line tool and an extension for Visual Studio Code. Pyright Playground Try Pyright in your browser using...
(server, django) Sphinx - (Repo, Home, PyPI) Documentation tool for interconnected bodies of authorship, from code documentation to books. Used by the official Python docs, and many other projects (not all of them Python). (console)
CODEOWNERS Added support for reading CyberShake seismograms and added a test case. 2年前 CODE_OF_CONDUCT.md code of conduct: usedevs@obspy.orgas contact 6年前 CONTRIBUTING.md Update CONTRIBUTING.md 3年前 CONTRIBUTORS.txt move contributor/credits info to top level for more visibility. fixes #48...