Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79711
| References | (5 earlier) <CAPTjJmpqKUe6Ou3nuNJNc7M8zuOcYK6YvYWWrO5abH3n3yVjTg@mail.gmail.com> <mailman.15081.1413994712.18130.python-list@python.org> <544a049c$0$13011$c3e8da3$5496439d@news.astraweb.com> <mailman.15126.1414138713.18130.python-list@python.org> <544cc160$0$12991$c3e8da3$5496439d@news.astraweb.com> |
|---|---|
| Date | 2014-10-26 20:51 +1100 |
| Subject | Re: When to use assert |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15193.1414317082.18130.python-list@python.org> (permalink) |
On Sun, Oct 26, 2014 at 8:39 PM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > In the absence of correctness proofs for your code, anything you do (unit > tests, assertions, regression tests, etc.) is just a statistically sampling > of all the potential paths your code might take, hoping to capture bugs. As > any statistician will tell you, eventually you will reach the point of > diminishing returns, where adding more samples isn't worth the cost. That > point will depend on the cost in programmer effort, the performance > implications, and your confidence in the code. That's about the size of it, I guess. How much testing versus how much time actually spent coding? I'm pretty sure a lot of my code has the wrong ratio... I'm just not sure, for a lot of the code, which direction it's wrong :) ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: When to use assert Anton <anton.schattenfeld@gmail.com> - 2014-10-21 00:48 -0700
Re: When to use assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-22 12:44 +1100
Re: When to use assert Chris Angelico <rosuav@gmail.com> - 2014-10-22 12:53 +1100
Re: When to use assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-23 02:49 +1100
Re: When to use assert Chris Angelico <rosuav@gmail.com> - 2014-10-23 03:01 +1100
Re: When to use assert Dan Stromberg <drsalists@gmail.com> - 2014-10-22 09:18 -0700
Re: When to use assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-24 18:49 +1100
Re: When to use assert Chris Angelico <rosuav@gmail.com> - 2014-10-24 19:18 +1100
Re: When to use assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-26 20:39 +1100
Re: When to use assert Chris Angelico <rosuav@gmail.com> - 2014-10-26 20:51 +1100
csiph-web