3 ms·
The one issue I have is with the PEP 8 camel case reference. I can see the value of everyone keeping the same style while coding, but at the same time who says
by yesimahuman 17y ago
The one issue I have is with the PEP 8 camel case reference. I can see the value of everyone keeping the same style while coding, but at the same time who says that style is the best? In terms of "expecting" that style when using other's libraries, you still have to read the docs for library to understand how to use it, so I don't see the ultimate value.
- RyanMcGreal 17y agoFrom PEP 8: But most importantly: know when to be inconsistent -- sometimes the style guide just doesn't apply. When in doubt, use your best judgment.
- andrewvc 17y agoI disagree, as a rubyist I find it really useful that everyone uses underscores. Language-wide style conventions make it easier to remember methods and classes since remembering a method like each_with_index as a phrase is easy, attaching a piece of useless data unrelated to what it does like Camel Case vs underscore is harder.
- mgreenbe 17y agoSettling on language-wide naming conventions reduces cognitive dissonance. Naming conventions don't supplant reading library docs, but they support it. In any case, you have to pick something, and some people will always be dissatisfied. The answer to any "who says" question about Python is "Guido van Rossum says". (In the case of PEP 8, Barry Warsaw says as well.)
- yesimahuman 17y agoI agree, but I don't agree that deviating from PEP 8 in terms of naming makes one a bad python programmer. I've seen so many deviations of these rules in libraries that if I were to expect a certain style I would be more frustrated than I am.