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


Groups > comp.lang.python > #100637

Re: Ignore error with non-zero exit status

Path csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.python
Subject Re: Ignore error with non-zero exit status
Date Sun, 20 Dec 2015 23:46:50 +0100
Organization PointedEars Software (PES)
Lines 43
Message-ID <2062582.Z8LLNUJk5W@PointedEars.de> (permalink)
References <mailman.4.1450632635.2237.python-list@python.org> <3883651.fOIMIIEhYO@PointedEars.de> <mailman.7.1450648598.2237.python-list@python.org>
Reply-To Thomas 'PointedEars' Lahn <usenet@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1450651612 9749 eJwFwQcBwEAIBDBL8KxDDmX4l9DExNk71M3Vzq5ZR8syiqWXpPYhkUMXQEtTpQeOv4cOzP4ZtBEW (20 Dec 2015 22:46:52 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Sun, 20 Dec 2015 22:46:52 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwFwYEBwCAIA7CXdFgK5wjY/09YAvPtzePwA0HZXhPJkKpN38y7sNfAvOgSPzM6Y0zTi6uQfe4Gd8YKzx+C1BXr
Cancel-Lock sha1:sZ2X3Z5JzYe6ORWm/6wWFOyQDIk=
X-NNTP-Posting-Host eJwNxsEBgDAIA8CVBJLAOoB2/xHqvY4h0yZEgYdn3tFzwvozkIkZE/9BvtnBrHKYF7p92boOPBAz
Xref csiph.com comp.lang.python:100637

Show key headers only | View raw


Chris Angelico wrote:

> On Mon, Dec 21, 2015 at 8:22 AM, Thomas 'PointedEars' Lahn
> <PointedEars@web.de> wrote:

It is supposed to be an attribution *line*, _not_ an attribution novel.  
Also, the “(was: …)” part is to be removed from the Subject header field 
value to complete the change of subject in a thread.

>> Python 2.6 (why are you using the oldest Python minor version?)
>> introduced string.format(), so you should use that instead of the old
>> string format operator (“%”):
>>
>>   logging.error("Can't run {0}; got {1} ({2:d})!".format(cmd, err, ret))
>>
>> <https://docs.python.org/2.6/library/stdtypes.html#str.format>
> 
> Percent formatting isn't going away. There's no need to tell people to
> abandon it in favour of .format(), unless they actually need a feature
> of .format().

,-<https://docs.python.org/2/library/stdtypes.html#str.format>
| 
| […]
| This method of string formatting is the new standard in Python 3, and 
| should be preferred to the % formatting described in <String Formatting 
| Operations> in new code.

>> On the other hand, you do not need the format operator to begin with:
>>
>>   logging.error("Can't run %s; got %s (%d)!", cmd, err, ret)
>>
>> <https://docs.python.org/2.6/library/logging.html#logging.error>
> 
> See? Another good reason to hang onto percent formatting.

Your logic is flawed.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

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


Thread

How to ignore error with anon-zero exit status Ganesh Pal <ganesh1pal@gmail.com> - 2015-12-20 23:00 +0530
  Ignore error with non-zero exit status (was: How to ignore error with anon-zero exit status) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-20 22:22 +0100
    Re: Ignore error with non-zero exit status (was: How to ignore error with anon-zero exit status) Chris Angelico <rosuav@gmail.com> - 2015-12-21 08:56 +1100
      Re: Ignore error with non-zero exit status Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-20 23:46 +0100
        Re: Ignore error with non-zero exit status Chris Angelico <rosuav@gmail.com> - 2015-12-21 10:09 +1100
          Re: Ignore error with non-zero exit status Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-21 08:51 +0100
            Re: Ignore error with non-zero exit status Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-12-21 12:58 +0000
              Re: Ignore error with non-zero exit status Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-21 14:19 +0100
                Re: Ignore error with non-zero exit status Chris Angelico <rosuav@gmail.com> - 2015-12-22 00:23 +1100
                Re: Ignore error with non-zero exit status Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-21 15:05 +0100
                Re: Ignore error with non-zero exit status Chris Angelico <rosuav@gmail.com> - 2015-12-22 01:11 +1100
                Re: Ignore error with non-zero exit status Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-21 15:19 +0100
                Re: Ignore error with non-zero exit status Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-12-21 16:07 +0000
                Re: Ignore error with non-zero exit status Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-21 23:30 +0100
                Re: Ignore error with non-zero exit status Random832 <random832@fastmail.com> - 2015-12-21 11:30 -0500
                Re: Ignore error with non-zero exit status Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-21 23:27 +0100
                Re: Ignore error with non-zero exit status Steven D'Aprano <steve@pearwood.info> - 2015-12-22 10:32 +1100
                Re: Ignore error with non-zero exit status Terry Reedy <tjreedy@udel.edu> - 2015-12-21 18:53 -0500
                Re: Ignore error with non-zero exit status Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-22 13:17 +0100
                Re: Ignore error with non-zero exit status Chris Angelico <rosuav@gmail.com> - 2015-12-22 11:05 +1100
                Re: Ignore error with non-zero exit status Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-21 17:17 -0700
                Re: Ignore error with non-zero exit status Chris Angelico <rosuav@gmail.com> - 2015-12-22 11:25 +1100
        Re: Ignore error with non-zero exit status Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-21 13:30 -0700
        Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Ben Finney <ben+python@benfinney.id.au> - 2015-12-22 07:58 +1100
        Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-21 14:16 -0700
          Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2015-12-21 21:44 +0000
            Re: Meaning and purpose of the Subject field Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-21 23:55 +0100
            Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Steven D'Aprano <steve@pearwood.info> - 2015-12-22 10:14 +1100
              Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2015-12-21 23:24 +0000
                Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-21 16:57 -0700
                Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Tim Chase <python.list@tim.thechases.com> - 2015-12-22 09:56 -0600
              Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Cameron Simpson <cs@zip.com.au> - 2015-12-22 14:36 +1100
              Re: Meaning and purpose of the Subject field Random832 <random832@fastmail.com> - 2015-12-21 23:22 -0500
                Re: Meaning and purpose of the Subject field Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-22 13:26 +0100
              Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Grant Edwards <invalid@invalid.invalid> - 2015-12-22 15:17 +0000
                Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-22 08:28 -0700
                Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Grant Edwards <invalid@invalid.invalid> - 2015-12-22 22:32 +0000
        Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-12-21 16:55 -0500
    Re: Ignore error with non-zero exit status (was: How to ignore error with anon-zero exit status) Ganesh Pal <ganesh1pal@gmail.com> - 2015-12-21 08:22 +0530
      Re: Ignore error with non-zero exit status Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-21 08:54 +0100

csiph-web