pylint style convention

Mick Charles Beaver mick at cs.wisc.edu
Mon Jul 23 19:22:11 EDT 2007


Hello,

I've been looking into using PyLint on some of my programs, just as a
best practices kind of thing.

Here's a snippet:
#======================================================================
if __name__ == '__main__':
    parser = optparse.OptionParser(usage='usage: %prog [OPTIONS]')
    parser.add_option('-c', '--config',
                      action='store',
                      type='string',
                      dest='configFilename',
                      help='config file containing defaults')
    (options, args) = parser.parse_args()
#======================================================================

Now, PyLint reports the following convention warnings:
C:158: Invalid name "parser" (should match (([A-Z_][A-Z1-9_]*)|(__.*__))$)
C:170: Invalid name "options" (should match (([A-Z_][A-Z1-9_]*)|(__.*__))$)
C:170: Invalid name "args" (should match (([A-Z_][A-Z1-9_]*)|(__.*__))$)

Which style convention is it referring to? Should these really be all
caps?

Thank you,
Mick




More information about the Python-list mailing list