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


Groups > comp.lang.python > #86587

Re: Python Worst Practices

References (3 earlier) <CAPTjJmrySN-tpcyXON4v_Ux0E961DYZqc5kF116sTLp_-RetqQ@mail.gmail.com> <85zj814jmb.fsf@benfinney.id.au> <1103e6a0-2183-4641-bf98-2927806c2172@email.android.com> <85h9u82wq1.fsf@benfinney.id.au> <757f69ee-b66b-426c-98e2-3b76c11f6075@email.android.com>
Subject Re: Python Worst Practices
From Simon Ward <simon+python@bleah.co.uk>
Date 2015-02-27 20:23 +0000
Newsgroups comp.lang.python
Message-ID <mailman.19313.1425068621.18130.python-list@python.org> (permalink)

Show all headers | View raw



On 27 February 2015 20:06:25 GMT+00:00, I wrote:

>I mentioned the true and false. OK, so it's a meme, but it's based on a
>false (pun intended) understanding of exit status codes. That success
>evaluates to true and failure evaluates to false does not mean the
>values of truth and falseness are inverted. No programming language
>other than that provided by system shells I have used evaluates 0 to
>true.

I hope the following examples from bash illustrate this:

$ (( 0 )) && echo success
$ (( 1 )) && echo success
success
$ (( 0 )) ; echo $?
1
$ (( 1 )) ; echo $?
0

Simon

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


Thread

Re: Python Worst Practices Simon Ward <simon+python@bleah.co.uk> - 2015-02-27 20:23 +0000

csiph-web