[Python-bugs-list] [ python-Bugs-566970 ] __imul__ broken for 'object's

noreply@sourceforge.net noreply@sourceforge.net
Tue, 11 Jun 2002 20:54:01 -0700


Bugs item #566970, was opened at 2002-06-10 12:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=566970&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2.1
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Alexander Schmolck (aschmolck)
Assigned to: Nobody/Anonymous (nobody)
Summary: __imul__ broken for 'object's

Initial Comment:
class Breaky(object):
    def __imul__(self, other):
        print "imuling"
        return self
sq = Breaky()
sq *=1.

gives:

Traceback (most recent call last):[...] line 10, in ?
    sq *=1.
TypeError: can't multiply sequence to non-int


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

>Comment By: Raymond Hettinger (rhettinger)
Date: 2002-06-11 22:54

Message:
Logged In: YES 
user_id=80475

Yes, it's a valid bug.
Yes, GvR already fixed it.

Verified that above code fails in 2.2 but runs fine in for 
2.2.2 and 2.3.

Closing bug.

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

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