Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61220

Re: One liners

Path csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
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.93; '*S*': 0.00; 'puts': 0.07; 'cc:addr :python-list': 0.11; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'readability': 0.16; 'ternary': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'first,': 0.26; 'header:In-Reply-To:1': 0.27; 'compared': 0.30; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'operators': 0.31; 'steven': 0.31; 'know.': 0.32; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'pm,': 0.38; 'does': 0.39; 'more': 0.64; 'subject:One': 0.74; 'unusual': 0.74; 'to:none': 0.92; '2013': 0.98
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=xveSRoQENR+/Y/T/pzT82UNEFhtthI/QYVZaq4wsYKc=; b=w6mKWQGivz0CFzg13S3unSDK84FybO88WZVMMghGxXznVOuFz4hpkri+5w8ZaT6sUA rrv+r7+q8VFQZz/UiNOkNF9thUAIFyg6y8duEM2GoMnoSEElFs9M9g7wOr4ykRzLUW31 9GWlM6qKtFdTBpwnbeOsQwsTypLaGPXkMteeaZNvwT9LQ2GQJkr124bHkExfNClbuEiM 6Xkr+pZUDajz8KTudph/St0DfTcgM9ZNAVnDLD9BQ6/C0FDTaTV1p20qckURyek3Lwm8 3cmxI/yr+xQPbwOxa3qywBjX9qs/LktlFLGDNkHZn8tzWNbtPQqicUEThVrih9spvWuj CVOA==
MIME-Version 1.0
X-Received by 10.66.160.2 with SMTP id xg2mr7652739pab.23.1386384013199; Fri, 06 Dec 2013 18:40:13 -0800 (PST)
In-Reply-To <52a287cb$0$30003$c3e8da3$5496439d@news.astraweb.com>
References <CAGGBd_o1TS02cosi+q9YeN5rnWJxe5mU7xtCTuTMZGO0ntF5TA@mail.gmail.com> <52A26763.3070803@gmail.com> <CAGGBd_rsP3rU6X30W_ocF8vNrPrLBrivT+nCv-1htgehmPZWrg@mail.gmail.com> <mailman.3678.1386375653.18130.python-list@python.org> <52a287cb$0$30003$c3e8da3$5496439d@news.astraweb.com>
Date Sat, 7 Dec 2013 13:40:13 +1100
Subject Re: One liners
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3692.1386384022.18130.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1386384022 news.xs4all.nl 2907 [2001:888:2000:d::a6]:40370
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:61220

Show key headers only | View raw


On Sat, Dec 7, 2013 at 1:28 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> As for readability, I accept that ternary if is unusual compared to other
> languages...

All the C-derived ternary operators put the condition first, but
Python puts the condition in the middle. What that does for
readability I don't really know. Which is more important?

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: One liners Michael Torrie <torriem@gmail.com> - 2013-12-06 17:20 -0700
  Re: One liners Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-07 02:28 +0000
    Re: One liners Chris Angelico <rosuav@gmail.com> - 2013-12-07 13:40 +1100
    Re: One liners Roy Smith <roy@panix.com> - 2013-12-06 22:27 -0500
      Re: One liners Chris Angelico <rosuav@gmail.com> - 2013-12-07 15:06 +1100
      Re: One liners Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-07 11:27 +0000
        Re: One liners Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-12-07 14:41 +0200
          Re: One liners Rotwang <sg552@hotmail.co.uk> - 2013-12-07 16:13 +0000
            Re: One liners Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-07 16:25 +0000
              Re: One liners Rotwang <sg552@hotmail.co.uk> - 2013-12-08 02:23 +0000
            Re: One liners Michael Torrie <torriem@gmail.com> - 2013-12-07 09:26 -0700
            Re: One liners Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-12-07 19:49 +0200
            Re: One liners Terry Reedy <tjreedy@udel.edu> - 2013-12-07 16:02 -0500
      Re: One liners Michael Torrie <torriem@gmail.com> - 2013-12-07 09:56 -0700
        Re: One liners rusi <rustompmody@gmail.com> - 2013-12-07 09:10 -0800
      Re: One liners Michael Torrie <torriem@gmail.com> - 2013-12-07 10:02 -0700

csiph-web