Date: Sat, 9 Oct 2004 22:58:04 +0900 From: Hye-Shik Chang <hyeshik@gmail.com> To: Valentino Volonghi aka Dialtone <dialtone@gmail.com>, freebsd-ports@freebsd.org, freebsd-python@freebsd.org Subject: Re: Python Coredump Message-ID: <4f0b69dc04100906587295b2b2@mail.gmail.com> In-Reply-To: <pan.2004.10.09.01.30.21.105819@gmail.com> References: <pan.2004.10.09.01.30.21.105819@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 09 Oct 2004 03:30:21 +0200, Valentino Volonghi aka Dialtone <dialtone#$#nospammingme#$$%@gmail.com> wrote: > Try executing this simple program in py: > > class NewList(list): > def __getslice__(self, start, stop): > if type(start) == str and type(stop) == str: > return self[self.index(start):self.index(stop)] > else: > return self[start:stop] > a = NewList([1,2,3,4,5,6]) > print a[1:4] > > In my FreeBSD 5.3-beta7 box it coredumps with bus error. > CPython is somewhat weak for recursive calls. Almost all cases can be blocked by default recursion limit (1000), but some of new-style methods and recursive calls for internal methods that consumes more than regular calls require more lower limit. You can prevent the bus error with sys.setrecursionlimit(500). Hye-Shik
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4f0b69dc04100906587295b2b2>