[Tutor] woodchuck test

Jeff Shannon jeff@ccvcorp.com
Tue, 15 Jan 2002 09:39:13 -0800


> kirk Bailey <idiot1@netzero.net> wrote:
>
> <sillyness>
> def woodchuck(wood):
>         index=0
>         while 1:
>                 try:
>                         print wood
>                         index=index+1
>                 return index
> </sillyness>

Heheheh...  I like it!  But you forgot to put an except (or finally) after your try ....

def woodchuck(wood):
    index = 0
    while 1:
        try:
            chuck(wood)
            index += 1
        finally:
            return index

:)

Jeff Shannon
Technician/Programmer
Credit International