r/Python • • Dec 22 '18

Xpost from Woodworking

Post image
1.1k Upvotes

84 comments sorted by

View all comments

Show parent comments

-2

u/BRENNEJM Dec 22 '18

PEP8 wants spaces like that? Weird. I never include spaces there.

3

u/alkasm github.com/alkasm Dec 22 '18

Which one, after the comma or around an operator? PEP8 suggests both but I disregard the one about operators. I do use spaces for add and subtract, but not for multiply and divide...just too far off from mathematics for me at that point.

2

u/BRENNEJM Dec 22 '18

I don’t use them in lists. It sounds like we write math the same.

According to PEP8 I shouldn’t be using mixedCase to name everything either. Maybe this weekend is a good time to finally read through PEP8.

2

u/alkasm github.com/alkasm Dec 22 '18

Yes, lowerCamelCase is super annoying to most Python programmers, lol!

Remember though, PEP 8 is suggestions. For small things like spacing, use what works for you. It is more important to be consistent. But being consistent with other projects is a nice feature, in which case following PEP 8 more strictly is likely to get you there.