pylint, was Re: pygame - importing GL - very bad...

Terry Reedy tjreedy at
Thu Jan 3 03:48:49 CET 2013

On 1/2/2013 9:24 PM, someone wrote:

> What pylint says is:
> 1) class somethingWork: Invalid name "somethingWork" (should match
> [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I suppose
> it wants my class name to start with a capital letter ?

> 2) self.lightDone: Invalid name "lightDone" (should match
> [a-z_][a-z0-9_]{2,30}$)
> So I can now understand that pylint doesn't like my naming convention
> with a capital letter in the middle of the variable name, like:
> "lightDone" = a boolean value. I suppose pylint wants me to use (a
> little longer method) an underscore to separate words in long variable
> names...

That is more conventional in the Python community (and is in pep 8, I 
believe) but still a choice.

> 3) self.rx / rself.ry / self.rz: Invalid name "rx" (should match
> [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an
> underscore ?

No, it allows underscores. As I read that re, 'rx', etc, do match. They 
are two chars in the indicated sets. I disagree with requiring 2 chars, 
as .x, .y, are sometimes quite appropriate.

Terry Jan Reedy

More information about the Python-list mailing list