[Python-bugs-list] [Bug #117745] Two Compensating bugs in UserString.__imul__

noreply@sourceforge.net noreply@sourceforge.net
Wed, 25 Oct 2000 14:59:22 -0700


Bug #117745, was updated on 2000-Oct-25 14:50
Here is a current snapshot of the bug.

Project: Python
Category: Library
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 5
Summary: Two Compensating bugs in UserString.__imul__

Details: In UserString.py from the library, the method "__imul__"
is mis-spelled as "__imull__" (extra L).  This turns out
to be a good thing, since the method uses "+=" on the data
member, a string, where what is intended is apparently "*=".
The class seems to work, I presume, because, since the
interpreter can't find a method __imul__, it does the
multiplication and re-assignment itself.  But:
  import UserString
  a=UserString.UserString("foo")
  a.__imull__(3)
produces a suitable error.


Follow-Ups:

Date: 2000-Oct-25 14:59
By: gvanrossum

Comment:
Thanks! Fixed now.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=117745&group_id=5470