[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Aw: Re: Re: Re: Re: stuck on time

> Like this?
>  >>>print_time()
> Traceback (most recent call last)
> File "stdin>", line 1, in <module>
> File "stdin>", line 2, in print_time
> File "stdin>", line 2, in print_time
> File "stdin>", line 2, in print_time
> [Previous line  repeated 996 more times]
> RecursionError: maximum recursion depth excedded.

Sort of, yes, but since you meanwhile redeclared the function:

def print_time():

to be recursive and then you ran that recursive function
it recursed until it ran out of resources.


> Running the code in a shell , it is displaying the time and now also the  date .

That would prove that the code itself is not
the reason why it hangs where you think it

I suggest sprinkling print statements about the initial code
and see what it prints to the console to find out where
(and whether) it actually hangs.