Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: Continuing indentation Date: Thu, 03 Mar 2016 13:30:23 +1100 Lines: 28 Message-ID: References: <0b33c10d-4366-49c7-8416-4d4ecd56ac8b@googlegroups.com> <56d79fcc$0$22141$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de REEZxjb5vEofOkdSiOaqGg2njf6ud4HidgbU7vA69mDA== Cancel-Lock: sha1:TwWeM7YCY5JcvsK0+ydV1EFv0I4= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.039 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'broken': 0.03; 'semantic': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'advocating': 0.16; 'bind': 0.16; 'expression.': 0.16; 'illusion': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'header :User-Agent:1': 0.26; "doesn't": 0.26; 'header:X-Complaints-To:1': 0.26; 'function': 0.28; 'that.': 0.30; 'waste': 0.30; 'point': 0.33; 'clarify': 0.33; "d'aprano": 0.33; 'steven': 0.33; "isn't": 0.35; 'but': 0.36; 'too': 0.36; 'should': 0.36; 'smaller': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'doing': 0.38; 'progress': 0.38; 'names': 0.38; 'to:addr:python.org': 0.40; 'still': 0.40; 'your': 0.60; 'great': 0.63; 'intent': 0.66; 'course.': 0.67; '_o__)': 0.84; 'complex,': 0.84; 'descriptive': 0.84; 'received:125': 0.84; 'western': 0.89; '\xe2\x80\x9cthe': 0.93; 'confirms': 0.95 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103927 Steven D'Aprano writes: > If you only use "continue_playing" in exactly one place, then it > doesn't deserve a name. I disagree. If it's complex, then it may still deserve a name. > > Names are important! > > Too important to waste on every single-use expression. To waste on *every* single-use expression? Of course. No one was advocating that. The point is to bind a descriptive name to a *complex* expression, if doing so will clarify the semantic intent of that expression. If your functions are so long that you fear using a specific name will deter you from using it again *in the same scope*, then the name isn't descriptive and a better one should be chosen, or the function is too large and should be broken into smaller pieces. -- \ “The history of Western science confirms the aphorism that the | `\ great menace to progress is not ignorance but the illusion of | _o__) knowledge.” —Daniel J. Boorstin, historian, 1914–2004 | Ben Finney