Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'indicating': 0.05; 'used.': 0.07; 'missed': 0.09; 'objects.': 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; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'relevant,': 0.16; 'routinely': 0.16; 'subject:Single': 0.16; 'subject:member': 0.16; 'subject:variable': 0.16; 'syntactic': 0.16; 'think?': 0.16; 'wrote:': 0.17; 'basically': 0.17; 'jan': 0.18; '>>>': 0.18; 'statement': 0.23; "i've": 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'convention': 0.27; 'header:X -Complaints-To:1': 0.28; 'could': 0.32; 'says': 0.33; 'to:addr :python-list': 0.33; 'form.': 0.33; 'version': 0.34; 'pm,': 0.35; 'subject:?': 0.35; 'received:org': 0.36; 'but': 0.36; "didn't": 0.36; 'anything': 0.36; 'should': 0.36; 'bad': 0.37; 'uses': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'leading': 0.61; 'times': 0.63; 'email addr:gmail.com': 0.63; 'received:fios.verizon.net': 0.84; 'significance': 0.84; 'subject:leading': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Single leading dash in member variable names? Date: Tue, 11 Sep 2012 17:34:03 -0400 References: <2cb240e2-7992-44eb-84cf-1aba5a411ee4@googlegroups.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:15.0) Gecko/20120824 Thunderbird/15.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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1347399307 news.xs4all.nl 6941 [2001:888:2000:d::a6]:60106 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28903 On 9/11/2012 4:53 PM, e.doxtator@gmail.com wrote: >>> What is the significance of the leading underscore in "self._bongo"? I've seen this a few times and, after looking through PEP 8, I didn't see anything relevant, but I could have missed it. >> Single leading underscore is a convention indicating that the name >> should be considered private and not used externally. It's a softer >> version of the double leading underscore that means basically the same >> thing but has syntactic significance. > PEP 8 says this is bad form. What do you think? Please quote the specific statement you want commented. The stdlib routinely uses _names for internal implementation objects. __ugh is perhaps never used. -- Terry Jan Reedy