Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'one?': 0.05; 'correct.': 0.07; '"if': 0.09; 'underscore': 0.09; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'message-id:@tim.thechases.com': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'convention': 0.27; "doesn't": 0.28; 'point': 0.31; 'to:addr:python-list': 0.33; 'version': 0.34; 'changed': 0.34; 'method': 0.36; 'why': 0.37; 'subject:: ': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'leading': 0.61; 'received:50.22': 0.84 Date: Tue, 09 Oct 2012 09:21:36 -0500 From: Tim Chase User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111120 Icedove/3.1.16 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Private methods References: <1krpbz9.1wge3j11123k2vN%real-not-anti-spam-address@apple-juice.co.uk> <1krpdak.u0qy9e1a4knspN%real-not-anti-spam-address@apple-juice.co.uk> In-Reply-To: <1krpdak.u0qy9e1a4knspN%real-not-anti-spam-address@apple-juice.co.uk> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Source: X-Source-Args: X-Source-Dir: 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1349792433 news.xs4all.nl 6880 [2001:888:2000:d::a6]:45958 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31027 On 10/09/12 08:59, D.M. Procida wrote: >> On 09/10/2012 14:24, D.M. Procida wrote: >>> What exactly is the point of a private method? Why or when would I want >>> to use one? > > In Python, using an underscore is simply a convention to note that a > method is private - it doesn't actually hide it from other things - > correct? Correct. You can read the leading underscore as "if you use this, don't come crying if it breaks on you in a future version because we changed an internal implementation. We told you so." -tkc