Services
Back

Question:

Pep8: Why is it needed? What rules does it describe?

How often asked: Often

Suggested by: ALittleMoron


Answer:

Pep8 is a set of rules adopted by the Python community. These are advisory in nature and represent a common coding style, including rules for indentation between functions, classes, variables, and so on.

Pep8 does not cover all coding rules, and different companies may have their own sets of rules that complement or contradict Pep8.


Interview answer explanation:

Interviewers often ask this question to determine whether the candidate has an understanding of coding styles.

Pep8 is the first document a Python newbie encounters. If someone isn't aware of this document, even after studying or even working with the language for some time, it raises suspicion.


External resources: