Python编码标准/最佳做法 [英] Python coding standards/best practices

查看:139
本文介绍了Python编码标准/最佳做法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在python中,您通常使用 PEP 8 - Python指南风格指南作为您的编码标准/指南?

In python do you generally use PEP 8 -- Style Guide for Python Code as your coding standards/guidelines? Are there any other formalized standards that you prefer?

推荐答案


在python中,你通常使用PEP 8 - Python代码风格指南作为您的代码标准/指南?是否还有其他正式的标准?

"In python do you generally use PEP 8 -- Style Guide for Python Code as your coding standards/guidelines? Are there any other formalized standards that you prefer?"

您可以按主题的 PEP 8 ,以及文档字符串约定的PEP 257

As mentioned by you follow PEP 8 for the main text, and PEP 257 for docstring conventions

除了Python风格指南,我建议您参考以下内容:

Along with Python Style Guides, I suggest that you refer the following:



  1. Code like a Pythonista:Idiomatic Python /learnpython.pbwiki.com/PythonTricksrel =nofollow noreferrer>常见的错误和疣

  2. 如何不写Python代码

  3. Python gotcha

  1. Code Like a Pythonista: Idiomatic Python
  2. Common mistakes and Warts
  3. How not to write Python code
  4. Python gotcha

这篇关于Python编码标准/最佳做法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆