Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; '*not*': 0.07; 'plenty': 0.07; 'subject:query': 0.07; 'comments?': 0.09; 'url:github': 0.09; 'cc:addr:python-list': 0.11; 'before.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'jumped': 0.16; 'tabs': 0.16; 'url:py': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; "aren't": 0.24; 'subject:Code': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'subject:/': 0.26; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'getting': 0.31; 'comments': 0.31; 'context,': 0.31; 'indentation': 0.31; 'level.': 0.33; 'common': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'consistent': 0.36; 'done': 0.36; 'doing': 0.36; "didn't": 0.36; 'pm,': 0.38; 'aside': 0.39; 'how': 0.40; 'here:': 0.62; 'places': 0.64; 'debate': 0.68; 'unusual': 0.74; 'batchelder': 0.84; 'choices.': 0.84; 'url:master': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=rw5mhUI1qKIH7HZR+vSmEjy1wZ/mQr9ICrMBa5GK2V8=; b=F5ZiOq41eQoDEvPLDKmJ/DK3dqfsi1BBcVAz9mb6ei2OMJxbaTCXjsLjIFLR9xPC+P B2P/g780MR46vX1eg8YtsJdVsTuqWxbctFknqi8PCYRsrEKdtT7fcd6bPakmB9h0b4xr acpwB0CdygoArxcJDLexREtgAXzmlRq3s/2CD30IuDwNYO7aN6ybevEojzNLzNgxySU0 AZyTBuP7JafTDXAvVHv3J7hfToEiYe3CaIicdsciGqVEo6WZA/S9unOjHEFxGL2yDGtU hTj1IMcYc8V5/E/mvIzYxmxhBEq8GHf19EBXBdKR9Z9OirttNiluFRqtMziKGexd4Qa5 ytvg== MIME-Version: 1.0 X-Received: by 10.68.108.1 with SMTP id hg1mr27565961pbb.80.1396306237163; Mon, 31 Mar 2014 15:50:37 -0700 (PDT) In-Reply-To: References: <874n2ecr5x.fsf@elektro.pacujo.net> Date: Tue, 1 Apr 2014 09:50:36 +1100 Subject: Re: Code style query: multiple assignments in if/elif tree From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1396306245 news.xs4all.nl 2878 [2001:888:2000:d::a6]:51689 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69452 On Tue, Apr 1, 2014 at 8:42 AM, Ned Batchelder wrote: > On 3/31/14 12:03 PM, Chris Angelico wrote: >> >> Incidentally, if you want to see the code in context, it's here: >> >> https://github.com/Rosuav/runningtime/blob/master/runningtime.py >> >> ChrisA > > > I know you didn't ask about these aspects, but they jumped out at me: tabs > for indentation instead of spaces, and docstring-style comments in places > that aren't docstrings. These seem like unusual choices. Tabs instead of spaces? They're plenty common enough, but I am *not* getting into that debate now. The file's perfectly consistent - aside from inside strings, all indentation is done with tabs, one per level. How do you go about doing multi-line comments? I know I've seen other code using triple-quoted strings for long comments before. ChrisA