Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #59718
| Date | 2013-11-17 06:50 -0600 |
|---|---|
| From | Tim Chase <python.list@tim.thechases.com> |
| Subject | Re: When to use assert |
| References | <528871d5$0$29975$c3e8da3$5496439d@news.astraweb.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2772.1384692574.18130.python-list@python.org> (permalink) |
On 2013-11-17 07:35, Steven D'Aprano wrote: > py> x = 23 > py> assert x > 0, "x is not zero or negative" This is the worst way to use an assertion: with a misleading message ;-) -tkc
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
When to use assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-17 07:35 +0000
Re: When to use assert Tim Chase <python.list@tim.thechases.com> - 2013-11-17 06:50 -0600
Re: When to use assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-18 00:52 +0000
Re: When to use assert Roy Smith <roy@panix.com> - 2013-11-17 08:33 -0500
Re: When to use assert Robert Day <robertkday@gmail.com> - 2013-11-18 08:20 +0000
Re: When to use assert Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-11-18 09:50 +0000
Re: When to use assert Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-18 10:02 +0000
Re: When to use assert Tim Chase <python.list@tim.thechases.com> - 2013-11-18 05:44 -0600
csiph-web