simple StackOverflower

Michal Bozon bozon at natur.cuni.cz
Tue Mar 21 10:47:07 EST 2000


On Tue, 21 Mar 2000, Berthold Hoellmann wrote:

> Michal Bozon wrote:
> > 
> > Oooooooops.
> > Correction:
> > 
> >  class StackOverflower:
> >      ":-)"
> >      def __init__(self):
> >          self.__init__()
> 
> With 
> 
> >python
> Python 1.5.2 (#3, Jul  7 1999, 08:48:09) [C] on sunos5
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> >>> class StackOverflower:
> ...      ":-)"
> ...      def __init__(self):
> ...          self.__init__()
> ... 
> >>> a=StackOverflower()
> 
> I get:
> 
> 
> Traceback (innermost last):
>   File "<stdin>", line 4, in __init__
>   File "<stdin>", line 4, in __init__
>   File "<stdin>", line 4, in __init__
>   File "<stdin>", line 4, in __init__
> ...
>   File "<stdin>", line 4, in __init__
>   File "<stdin>", line 4, in __init__
>   File "<stdin>", line 4, in __init__
>   File "<stdin>", line 4, in __init__
>   File "<stdin>", line 4, in __init__
> RuntimeError: Maximum recursion depth exceeded
> >>> 
> 
> No stack overflow.
But something like stack overflow

I have Python installed on W98. I got no message. Python simply crashed.
Michal

P.S. It was only joke. 

> 
> Cheers
> 
> Berthold
> -- 
> email: hoel at GermanLloyd.org
>    )
>   (
> C[_]  These opinions might be mine, but never those of my employer.
> 
> 




More information about the Python-list mailing list