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?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Sorry, you do not have a permission to ask a question, You must login to ask question.
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?
You must login to add an answer.
Anurag Dasgupta
You can also refer to Google Python Style Guide. This style guide is a list of dos and don’ts for Python programs.
See: https://google.github.io/styleguide/pyguide.html
Dipayan Sarkar
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