This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Two Compensating bugs in UserString.__imul__
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum
Priority: normal Keywords:

Created on 2000-10-25 21:50 by anonymous, last changed 2022-04-10 16:02 by admin. This issue is now closed.

Messages (2)
msg2171 - (view) Author: Nobody/Anonymous (nobody) Date: 2000-10-25 21:50
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.
msg2172 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2000-10-25 21:59
Thanks! Fixed now.
History
Date User Action Args
2022-04-10 16:02:32adminsetgithub: 33399
2000-10-25 21:50:54anonymouscreate