__getattr__ and pickle

Thomas Wouters thomas at xs4all.net
Wed Jul 5 18:13:48 EDT 2000


On Wed, Jul 05, 2000 at 02:58:43PM -0400, Warren Postma wrote:
> "Gordon McMillan" <gmcm at hypernet.com> wrote in message
> news:8F655BA3Egmcmhypernetcom at 199.171.54.154...

> > C'mon Sean! You've been around a while. You know when __getattr__ hacks go
> > bad it's because they go recursive. (And the stack size on Windows is off
> > by  some tiny amount, so it GPFs instead of traps.)

> That kinda says (a) Windows Sucketh, and (b) surely there must be a
> workaround for the Infinite-Recursion-Crash bug?

Well, there is. There's this little counter that keeps track, but the
recursion counter is set too high for Windows, apparently, so it chooses to
crash before Python stops itself.

> Oh yeah, there is, .... It's called Christian Tismer's Stackless Python.
> Hope that stackless makes it into the official python, by 1.7, or if not,
> there's always 3000.  Here's hoping.

There is no 1.7, the next release is going to be 2.0, not 1.6 ;) At least,
that's what the CVS tree is calling itself. As for Stackless, I agree it's a
thing of coolness, but it won't help you out in infinite recursion; it's
stackless, not limitless. You'll run out of memory eventually.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list