Re: [Tutor] about assert

2006-09-13 Thread Marc Poulin
--- [EMAIL PROTECTED] wrote: > >>Python manual has a very brief introduction > >>of "assert" statements. It is very difficult > > First you probably don't need to use asserts > very often, they are useful if you are building > production strength code but for most users > of Python the exce

Re: [Tutor] about assert

2006-09-13 Thread alan . gauld
>>Python manual has a very brief introduction >>of "assert" statements. It is very difficult First you probably don't need to use asserts very often, they are useful if you are building production strength code but for most users of Python the exception mechanism is good enough. Basically we

Re: [Tutor] about assert

2006-09-13 Thread Marc Poulin
--- "linda.s" <[EMAIL PROTECTED]> wrote: > Python manual has a very brief introduction of > "assert" statements. It > is very difficult for me to understand it. Every program has some fundamental assumptions that must remain true in order for the program to continue giving correct results. The

Re: [Tutor] about assert

2006-09-13 Thread Luke Paireepinart
linda.s wrote: > Python manual has a very brief introduction of "assert" statements. It > is very difficult for me to understand it. Can anyone give me an > example? > #example of assert.py def test(a): if 25 / 4 == a: return True else: return False def assert_it(a):