At 02:30 PM 7/6/2008, Kent Johnson wrote:
On Sun, Jul 6, 2008 at 2:49 AM, Dick Moores <[EMAIL PROTECTED]> wrote:
> I have a module, mycalc.py, which is a collection of functions designed to
> be imported independently.
>
> I've heard about using assert() to check up on whether things are still
>
On Sun, Jul 6, 2008 at 2:49 AM, Dick Moores <[EMAIL PROTECTED]> wrote:
> I have a module, mycalc.py, which is a collection of functions designed to
> be imported independently.
>
> I've heard about using assert() to check up on whether things are still
> working correctly, or something like that. S
At 06:01 AM 7/6/2008, Alan Gauld wrote:
"Dick Moores" <[EMAIL PROTECTED]> wrote
Traceback (most recent call last):
File "E:\PythonWork\Untitled 2.py", line 42, in
assert(fact(10,4) == 3.629e+6)
AssertionError
I'm not sure but I suspect you are running into the dreaded floating
point pre
"Dick Moores" <[EMAIL PROTECTED]> wrote
Traceback (most recent call last):
File "E:\PythonWork\Untitled 2.py", line 42, in
assert(fact(10,4) == 3.629e+6)
AssertionError
I'm not sure but I suspect you are running into the dreaded
floating point precision problem.
You probably need to
At 01:23 AM 7/6/2008, Alan Gauld wrote:
"Dick Moores"
<[EMAIL PROTECTED]> wrote
I've heard about using assert()
to check up
The top three work silently, but
I found that I could not figure out how to use assert() with the
functions that print rather than return. E.g., maxDiffBetPrimes() and
prin
"Dick Moores" <[EMAIL PROTECTED]> wrote
I've heard about using assert() to check up
The top three work silently, but I found that I could not figure
out how to use assert() with the functions that print rather than
return. E.g., maxDiffBetPrimes() and printTime(). Is there a way?
Thats an
I have a module, mycalc.py, which is a collection of functions designed
to be imported independently.
I've heard about using assert() to check up on whether things are still
working correctly, or something like that. So I've begun to write some
assert() expressions(?) and put them at the bottom
Shivayogi,
Sorry my last e-mail wasn't very helpful.
Better would have been:
>>> a=myClass()
>>> b=myClass()
>>> a.howmany()
>>> myClass.count=0
>>> del a
which will (hopefully) give you something like:
Exception exceptions.AssertionError: in > ignored
Assert is commonly used as a sanity
shivayogi kumbar wrote:
> sir,
>I would like to know about 'asser't keyword how it works in the
> fallowing program
I'm not sure what the question is. Do you not understand assert at all
or is there something about how this program works that you don't
understand?
assert is documented here:
Try this:
>>>a=myClass()
>>>b=myClass()
>>>a.howmany()
>>>a.count=0
>>>del a
Does this help clear things up?
Todd Maynard
On Friday 23 December 2005 06:18, shivayogi kumbar wrote:
> class myClass:
> count = 0
> def __init__(self):
>
sir,
I would like to know about 'asser't keyword how it works in the
fallowing program
class myClass:
count = 0
def __init__(self):
myClass.count = myClass.count + 1
def __del_
11 matches
Mail list logo