Do experienced Python developers really need to follow PEP 8?
Asked by
MellowCedar42
I've been writing Python with camelCase for years and haven't paid much attention to PEP 8's preference for snake_case. Is following PEP 8 actually important for a senior developer, especially when working on a portfolio or personal project?
Answers
For a portfolio project or anything you plan to share publicly, following PEP 8 is generally worth the effort. It signals that you understand common Python conventions and prevents reviewers from being distracted by unusual naming. PEP 8 also uses different conventions for functions, variables, classes, constants, and other names, so itโs more than just replacing camelCase with snake_case.
Reply to this answer
Thereโs no need to treat PEP 8 as absolute law. Some teams have their own style guide or legacy codebase, and consistency with that code is usually the priority. Even when you intentionally diverge from PEP 8, having a clear, consistent standard is much better than letting every file use a different style.
Reply to this answer
PEP 8 is a convention, not a requirement enforced by Python. For a private project that only you maintain, you can choose whatever style helps you work. Once other developers are involved, though, following the projectโs established conventions makes the code much easier to read, review, and maintain. The team standard matters more than personal preference.
Reply to this answer
Add your answer
Answers are reviewed before publication.
MellowCedar42: That makes sense. This is currently a portfolio project, so Iโm leaning toward using snake_case and the other usual PEP 8 conventions so the code is easier for reviewers to understand.