[Python-bugs-list] [ python-Bugs-461546 ] bug in long_mul

noreply@sourceforge.net noreply@sourceforge.net
Fri, 14 Sep 2001 07:18:17 -0700


Bugs item #461546, was opened at 2001-09-14 07:18
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=461546&group_id=5470

Category: Type/class unification
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Tim Peters (tim_one)
Summary: bug in long_mul

Initial Comment:
Here's a strange exception:

>>> class C(long):
    __dynamic__ = 1

>>> c = C(1)
>>> c*1
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
SystemError: ../Objects/longobject.c:186: bad argument
to internal function
>>> 1*c
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
SystemError: ../Objects/longobject.c:186: bad argument
to internal function
>>> 

If I change __dynamic__ to 0, all's well:

>>> class C(long):
    __dynamic__ = 0

>>> c = C(1)
>>> c*1
1L
>>> 1*c
1L
>>> 


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

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