大名鼎鼎的 Requests 库用了什么编码风格?
作者:Kenneth Reitz
原题:Kenneth Reitz’s Code Style™
Requests 的代码库使用 PEP-8 编码风格。
除了 PEP-8 中列出的标准外,我们还有一些指导原则:
如果方便的话,行长(Line-length)可超过 79 个字符,达到 100 个字符。
如果换行会导致严重的不方便,则行长可以超过 100 个字符。
除非在字符串中出现单引号,否则始终使用单引号字符串(例如,'#flatearth')。
此外,PEP-8 推荐的用于连续行的编码风格毫...
pythoncat.hashnode.dev1 min read