Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #103743
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: usage of try except for review. |
| Date | 2016-03-01 04:38 +1100 |
| Message-ID | <mailman.31.1456767509.20602.python-list@python.org> (permalink) |
| References | <CACT3xuWm56OE7LpR8kBLfWfkDoU18sPcN5DRiXjr=68+Kywo8Q@mail.gmail.com> <CACT3xuXA=xy8ovTQOS9Bz06P0R1FjQ=bN4-3Pxqf3Cu7wN1dXg@mail.gmail.com> <c5r8dbplpbr62lca859i5cs5dlskfdqeuu@4ax.com> <CACT3xuXC8ZxTd6E-giB9xEJvikQ76o62a5TKrZsQmqZgQtjLsw@mail.gmail.com> |
On Tue, Mar 1, 2016 at 4:34 AM, Ganesh Pal <ganesh1pal@gmail.com> wrote: > On Mon, Feb 29, 2016 at 10:10 PM, Dennis Lee Bieber > <wlfraed@ix.netcom.com> wrote: > >> Ask yourself: Will my program still work if I remove all the assert >> statements. If the answer is "No", then you should not be using an assert. > > You meant if the answer is "NO" then I should be using asset ? No, Dennis was correct. You should assume that "assert" can potentially be replaced with "pass" and your program will continue to work. ChrisA
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: usage of try except for review. Chris Angelico <rosuav@gmail.com> - 2016-03-01 04:38 +1100 Re: usage of try except for review. Steven D'Aprano <steve@pearwood.info> - 2016-03-01 23:05 +1100
csiph-web