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


Groups > comp.lang.python > #86548 > unrolled thread

Re: Python Worst Practices

Started byBen Finney <ben+python@benfinney.id.au>
First post2015-02-27 08:23 +1100
Last post2015-02-27 08:23 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python Worst Practices Ben Finney <ben+python@benfinney.id.au> - 2015-02-27 08:23 +1100

#86548 — Re: Python Worst Practices

FromBen Finney <ben+python@benfinney.id.au>
Date2015-02-27 08:23 +1100
SubjectRe: Python Worst Practices
Message-ID<mailman.19292.1424985803.18130.python-list@python.org>
Simon Ward <simon+python@bleah.co.uk> writes:

> On 26 February 2015 00:11:24 GMT+00:00, Ben Finney <ben+python@benfinney.id.au> wrote:
> >You'd better borrow the time machine and tell the creators of Unix. The
> >meme is already established for decades now.
>
> 0 = success and non-zero = failure is the meme established, rather
> than 0 = true, non-zero = false.

That is not the case: the commands ‘true’ (returns value 0) and ‘false’
(returns value 1) are long established in Unix. So that *is* part of the
meme I'm describing.

> None of the above is a good reason to use error *or* success return
> values in Python--use exceptions!--but may be encountered when running
> other processes.

Right. But likewise, don't deny that “true == 0” and “false == non-zero”
has a wide acceptance in the programming community too.

-- 
 \            “Program testing can be a very effective way to show the |
  `\        presence of bugs, but is hopelessly inadequate for showing |
_o__)                              their absence.” —Edsger W. Dijkstra |
Ben Finney

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web