Path: csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'modify': 0.04; 'diff': 0.05; 'append': 0.07; 'item,': 0.09; 'output?': 0.09; '-tkc': 0.16; 'comma': 0.16; 'comma.': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'wrote:': 0.16; '(usually': 0.22; 'arguments': 0.22; 'select': 0.23; 'header:In-Reply-To:1': 0.24; 'helpful': 0.27; 'primary': 0.31; "can't": 0.32; 'except': 0.34; 'add': 0.34; 'replaced': 0.35; 'something': 0.35; 'but': 0.36; 'keyword': 0.36; 'smaller': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'charset:us-ascii': 0.37; 'delete': 0.38; 'to:addr:python.org': 0.40; 'skip:n 10': 0.62; 'needing': 0.63; 'otten': 0.84; 'received:23': 0.84; 'subject:location': 0.84; 'improvement': 0.93 X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-MC-Relay: Neutral X-MailChannels-SenderId: wwwh|x-authuser|tim@thechases.com X-MailChannels-Auth-Id: wwwh X-MC-Loop-Signature: 1441291014430:4003743325 X-MC-Ingress-Time: 1441291014429 Date: Thu, 3 Sep 2015 09:36:23 -0500 From: Tim Chase To: python-list@python.org Subject: Re: Strange location for a comma In-Reply-To: References: <55e83afb$0$3157$426a74cc@news.free.fr> <55e83ce3$0$3327$426a74cc@news.free.fr> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AuthUser: tim@thechases.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441293213 news.xs4all.nl 23818 [2001:888:2000:d::a6]:56823 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95939 On 2015-09-03 14:48, Peter Otten wrote: > The only reason I see to add an extra comma are smaller and easier > to read diffs when you make a change: While that's the primary reason I do it, it's also helpful if you have a bunch of named keyword arguments and want sort/rearrange them (usually for clarity/grouping). You don't have to worry about finding the previous-last-item and adding a comma to it and then finding the new-last-item and removing its comma. Also, when adding a new item, you can just copy an existing line, paste it, and modify the salient parts without needing to append a comma to one line or delete it from the pasted line. But the improvement in diff output? That's a big win for me. I notice it most when I *can't* use it, like in writing SQL: SELECT col1, col2, col3, -- grr, can't do this FROM tblExample so my SQL diffs are the "removed this line and replaced it with something almost identical except it now has a comma". Harumph. -tkc