[Python-bugs-list] [ python-Bugs-551412 ] possible to fail to calc mro's

noreply@sourceforge.net noreply@sourceforge.net
Thu, 02 May 2002 06:42:26 -0700


Bugs item #551412, was opened at 2002-05-02 13:42
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=551412&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2.1 candidate
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Hudson (mwh)
Assigned to: Guido van Rossum (gvanrossum)
Summary: possible to fail to calc mro's

Initial Comment:
This only crashes on the release22-maint branch, and
only when coredump is true:

class UserLong(object):
    def __pow__(self, *args):
        pass

coredump = 1

if not coredump:
   int.__mro__

pow(0, UserLong(), 0)

It's the type of the first argument to pow() that's
relavent: if you change it to "pow(0L, UserLong(), 0)"
you then have to change "int.__mro__" to "long.__mro__"
to avoid the crash.

Maybe it was the "typeobject.c refactoring" patch that
accidentally fixed this on the trunk?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=551412&group_id=5470