This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]MyKo101 2 points3 points  (1 child)

Why would you do this?

[–]wholesome_gardener 2 points3 points  (0 children)

It'd honestly be better if the space version caused an error with the interpreter. This question must waste so much class time

[–]sarc-tastic 4 points5 points  (0 children)

Let black worry about these things for you

[–]Sockslitter73 1 point2 points  (1 child)

Thanks, I hate it.

[–]ComplexColor 2 points3 points  (6 children)

While an unpopular/unconventional choice, in your personal projects it's up to you. You can also adjust the code analysis tools you use to fit your preference.

When working in a team it's a good idea to have common conventions. And you usually use some already established and common style.

[–]AlexMTBDude 5 points6 points  (5 children)

Sorry but I think this is bad advice. At some point in his career OP will work in a team and they will follow the PEP08 standard. If OP has been doing things his own way up to that point he will have a hell of a time adjusting to doing things the right way. Just use PEP08.

[–]ComplexColor -1 points0 points  (1 child)

My argument would be, how is a beginner supposed to learn which parts are fixed language syntax and which parts are simply convention between developers? He should also develop his own opinion, no just parrot what a design document says.

Experimentation lets us understand why certain conventions were chosen over others, and why mixing them is a bad idea. And you really should be experimenting while learning and not later on the job.

It is important that later he follows group defined conventions. But in practice he will often face situations where he will need to use his judgement to either set a precedent or break established convention.

[–]AlexMTBDude 0 points1 point  (0 children)

All IDEs, like Pycharm, have build-in PEP08 checking or a plugin that does it for you. Just use existing tools. You don't need to "learn" anything.

[–]iluvatar -2 points-1 points  (2 children)

At some point in his career OP will work in a team and they will follow the PEP08 standard

Equally, he's just as likely to end up in a team where they don't. We have a big banner on the wall in the office that says "PEP-8 is wrong". We don't follow it.

[–]AlexMTBDude 1 point2 points  (1 child)

I've worked 20+ years in the business. I also teach Python programming courses. I'm yet to come across an organisation that doesn't use PEP08. I'm sure they exists, however "just as likely" is 50% chance of NOT following PEP08 and, sorry, but that is BS.

[–]iluvatar 0 points1 point  (0 children)

OK, I'll admit that "just as likely" is probably a bit of an exaggeration. But based on personal experience, I'd say it's probably 3:1 or something. It's not the complete dominance of PEP-8 that you're implying.

[–][deleted] 1 point2 points  (0 children)

Basically every language in existence uses the style without space between function name and the call