Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Ignore error with non-zero exit status Date: Tue, 22 Dec 2015 11:25:40 +1100 Lines: 27 Message-ID: References: <3883651.fOIMIIEhYO@PointedEars.de> <2062582.Z8LLNUJk5W@PointedEars.de> <2721557.Hpeo4xmTem@PointedEars.de> <2726691.rQGQ7FqzaZ@PointedEars.de> <2827307.1DEaE21uzt@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de aTKCzMjk2ikIcgn7Z5WbYA7O8E5XfeqT+63/Qd1EzrXQ== 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; 'received:209.85.223': 0.03; '21,': 0.07; 'expressions': 0.07; 'msg': 0.07; 'puts': 0.07; 'repeated': 0.07; 'semantic': 0.07; 'cc:addr:python-list': 0.09; '22,': 0.09; 'subject:error': 0.11; '"."': 0.16; '"terry': 0.16; 'cc:name:python': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'reedy"': 0.16; 'subject:non': 0.16; 'verbose,': 0.16; 'wrote:': 0.16; 'string': 0.17; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'otherwise,': 0.20; 'latter': 0.22; 'am,': 0.23; 'dec': 0.23; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'equivalent': 0.27; 'message-id:@mail.gmail.com': 0.27; 'pep': 0.29; 'url:peps': 0.29; 'another': 0.32; '"the': 0.32; 'compiled': 0.32; 'changed': 0.33; 'url:python': 0.33; 'tue,': 0.34; 'except': 0.34; 'received:google.com': 0.35; 'url:dev': 0.35; "isn't": 0.35; 'but': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'being': 0.37; 'received:209': 0.38; 'format': 0.39; 'subject:-': 0.39; 'rather': 0.39; 'subject:with': 0.40; 'more': 0.63; 'sum': 0.69; 'competition': 0.70; '4:55': 0.84; 'chrisa': 0.84; 'compare:': 0.84; 'subject:status': 0.84; 'to:none': 0.91 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=+pjvqwfChou49GLOQwf3p3Cc3TFBXbNPNL33UeQuiOE=; b=L2ZnMhl2D8C5ZmYPniCuO88HiIRxy0DBN3FlP82dnz+wOYMc0ATZu10JX9P350G2h0 g6vmjZnVaDkQ9BftwIGXljtlzGk+tPVpmKS8wUwE0yVlQMTdm2pN/MbWrDwF1nR9aRo1 +dSmKSbwYRb5KPjtW//nHFp6kG2FgKETAD0uVu9KSw+fkWlTfawYp9unxrEyXJAd4W6L VX/lS5llxkWsORiGU0Bk5Ov/HOWj58Z4Dppawg/1CAj/9F7kcrkmInwasqWmKZw/LeQ+ 1wvCFdpjaZGH2Q5H589JvdwP6VTf0LryqUGTWdb6DxkodbaFG8aFSlAkOZ5mn5YO0Ap9 Gblg== X-Received: by 10.107.40.76 with SMTP id o73mr17640194ioo.157.1450743940901; Mon, 21 Dec 2015 16:25:40 -0800 (PST) In-Reply-To: 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: , Xref: csiph.com comp.lang.python:100713 On Tue, Dec 22, 2015 at 11:17 AM, Ian Kelly wrote: > On Dec 21, 2015 4:55 PM, "Terry Reedy" wrote: >> >> Nothing has changed since except for >> https://www.python.org/dev/peps/pep-0498/ >> already added to 3.6. > > https://xkcd.com/927/ The 927ness of it was discussed at length prior to implementation. PEP 498 isn't really another competing string format operation; it's more like an alternative expression format. It's more in competition with this: msg = "The sum of " + str(x) + " and " + str(y) + " is " + str(x+y) + "." which puts the interpolated expressions at the "correct place" in the string - but at the cost of being verbose, messy, and error-prone. Compare: msg = f"The sum of {x} and {y} is {x+y}." (Yes, there's a slight semantic difference; the latter uses format() rather than str(). But otherwise, it's compiled to the "".join(...) equivalent of the repeated concatenation example.) ChrisA