__imul__ broken for 'objects' in 2.2.1

Christos Georgiou DLNXPEGFQVEB at spammotel.com
Mon Jun 10 08:47:00 EDT 2002

On 07 Jun 2002 18:17:45 +0100, rumours say that Alexander Schmolck
<a.schmolck at gmx.net> might have written:

>class Breaky(object):
>    def __imul__(self, other):
>        print "imuling"
>        return self
>sq = Breaky()
>sq *=1.
>Traceback (most recent call last):[...] line 10, in ?
>    sq *=1.
>TypeError: can't multiply sequence to non-int

Just in case: it is indeed your intention to multiply the object with a
float, right?

PS It seems that a Breaky instance is not (incorrectly) considered a
sequence in 2.3a0 (20020603).
TZOTZIOY, I speak England very best,
Real email address: 'dHpvdEBzaWwtdGVjLmdy\n'.decode('base64')

More information about the Python-list mailing list