Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'skip:[ 20': 0.03; 'indicated': 0.07; 'suppose': 0.07; 'python': 0.09; 'appropriate.': 0.09; 'pep': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'underscore': 0.09; 'value.': 0.15; '(should': 0.16; 'boolean': 0.16; 'naming': 0.16; 're,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'variable': 0.20; 'allows': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'separate': 0.27; 'convention': 0.27; 'regular': 0.27; "doesn't": 0.28; 'header:X -Complaints-To:1': 0.28; 'sets.': 0.29; 'no,': 0.29; 'words': 0.29; 'class': 0.29; "i'm": 0.29; '(and': 0.32; 'says': 0.33; 'like:': 0.33; 'to:addr:python-list': 0.33; 'requiring': 0.35; 'community': 0.35; 'pm,': 0.35; 'sometimes': 0.35; 'received:org': 0.36; 'but': 0.36; 'two': 0.37; 'quite': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'little': 0.39; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'end': 0.40; 'subject:, ': 0.61; 'subject:...': 0.63; 'more': 0.63; 'middle': 0.66; 'capital': 0.68; 'etc,': 0.84; 'received:fios.verizon.net': 0.84; 'subject:very': 0.91; 'choice.': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: pylint, was Re: pygame - importing GL - very bad... Date: Wed, 02 Jan 2013 21:48:49 -0500 References: <50e4c83b$0$30003$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357181380 news.xs4all.nl 6928 [2001:888:2000:d::a6]:48498 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36027 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 ? Yes > > 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