Coredump: python 1.5.2
Fredrik Lundh
fredrik at pythonware.com
Thu Jul 8 04:12:55 EDT 1999
Toby J Sargeant <tjs at longford.cs.monash.edu.au> wrote:
> The following code causes a coredump under python 1.5.2
>
> class Stuffed:
> def __getattr__(self,key):
> print self
>
> print Stuffed()
python looks for __str__ and/or __repr__ attributes when
you print an instance object, so that "print self" sends you
right back to __getattr__.
you run out of stack space, in other words.
</F>
More information about the Python-list
mailing list