Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #86548
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Subject | Re: Python Worst Practices |
| Date | 2015-02-27 08:23 +1100 |
| References | (1 earlier) <CAPTjJmppMhBuLy=LMC=ycN0RYE9Jp8BVZbdSeqBZupd_7Nwxfw@mail.gmail.com> <85bnkh5z96.fsf@benfinney.id.au> <CAPTjJmrySN-tpcyXON4v_Ux0E961DYZqc5kF116sTLp_-RetqQ@mail.gmail.com> <85zj814jmb.fsf@benfinney.id.au> <1103e6a0-2183-4641-bf98-2927806c2172@email.android.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.19292.1424985803.18130.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Python Worst Practices Ben Finney <ben+python@benfinney.id.au> - 2015-02-27 08:23 +1100
csiph-web