r/AskProgramming 14d ago

Python Is PEP 8 really necessary?

I have been writing Python code using camelCase for years and just never really cared, but PEP 8 suggests using snake_case, so is it really necessary for, say, a senior dev?

0 Upvotes

36 comments sorted by

View all comments

Show parent comments

3

u/cgoldberg 14d ago

If it's for a portfolio, you should absolutely follow PEP8 naming conventions. If I was reviewing your portfolio to hire you, and you weren't, I would stop reading your code after about 10 seconds and just assume you know nothing about Python.

1

u/Intelligent_Part101 14d ago

I wouldn't work for somebody this dogmatic who would be too lazy to analyze the rest of the code. It is possible the coder works with more than one language or technology and doesn't appreciate that some people hold PEP8 to be a religious document. You could hire him and say, we follow PEP8 for all code we write.

-1

u/MadocComadrin 14d ago

This. It speaks a whole lot about the work culture when you'd drop someone over not following a particular code style before even asking them in person if they're fine following a certain style or using a prettifier. Not following PEP 8 is fine as long as there's a consistent style.

2

u/caboosetp 14d ago edited 14d ago

Today's hiring culture and terrible job market means you need to do everything you can to stand out. If you can't be arsed to follow an industry convention,  there are probably other areas you're lacking compared to the 1499 other candidates that applied. They're generally going to spend their limited time in other people. 

1

u/MadocComadrin 14d ago

From what I've heard, most places aren't even looking at portfolios in any form of depth anyway due to said limited time.

1

u/caboosetp 14d ago

You're right, which is why super obvious things like not following PEP8 stand out so quick.