Subclassing FixedPoint
Tim Peters
tim.one at comcast.net
Tue Oct 15 14:04:42 EDT 2002
[posted & mailed]
[paul at nlhas.no]
> Can anyone explain why the following fails when using the subclass
> (recursion problem), but work using the base class?
[Doug Fort]
> I presume it's a bug too. I'm tied up with my day job right now.
> I'll look into it when I get the chance. I fear it's related to
> the use of __slots__, which I threw in just because it sounded cool.
I've opened a bug report against Python on this:
http://www.python.org/sf/623669
__slots__ are irrelevant here, but deriving from object is not. I'm unclear
on whether the change in behavior was intentional or is just a bug, so
assigned that report to Guido for clarification. A brute-force workaround
(immune to choice of old-style vs new-style class) is explained at the
bottom of that bug report.
More information about the Python-list
mailing list