Are there any coding standards in Python?

Like in C ++, we have certain coding standards that help us write proper code by following defined coding conventions. Are there any coding standards in Python?

2 comments

  1. Its always a nice idea to follow coding conventions & standards. Code commenting also helps a lot in understanding the code written by other developers. The following need to be given attention to: Naming conventions, Code layout, Indentation, Comments.

    For python, the standard that is followed is PEP8. PEP8 defines the style guide for python coding. A full style guide is documented in official python.org site: https://www.python.org/dev/peps/pep-0008/

    You may also like to read – when NOT to use PEP8 @ https://realpython.com/python-pep8/#when-to-ignore-pep-8

Leave a comment