usage of try except for review.
Steven D'Aprano
steve at pearwood.info
Tue Mar 1 07:05:42 EST 2016
On Tue, 1 Mar 2016 04:38 am, Chris Angelico wrote:
> On Tue, Mar 1, 2016 at 4:34 AM, Ganesh Pal <ganesh1pal at gmail.com> wrote:
>> On Mon, Feb 29, 2016 at 10:10 PM, Dennis Lee Bieber
>> <wlfraed at 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.
http://import-that.dreamwidth.org/676.html
--
Steven
More information about the Python-list
mailing list