Python Style Guide Questions - Contd.
koranthala at gmail.com
Mon Jan 19 14:50:54 CET 2009
I have some more questions about python code styling.
1. Global Variables: In my code, I am using some global variables.
Now, when I ran PyLint, it raised convention errors mentioning that
they should be CAPITAL_ALPHABETS. Now, in PEP 8, I did not see that
mentioned. Please let me know whether that is the usual styling
mechanism which is used.
2. I have many loops wherein I define a variable as just a counter.
for x in range(counter):
Please note that I am not using x anywhere in the program.
Pylint again raises warnings saying that the variable should be
Should I disregard it or use the default variable _ ?
for _ in range(counter):
pylint does not raise errors for those. Are there any issues in
using _ ?
More information about the Python-list