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: Can't multiply str and bool
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, rhettinger
Priority: normal Keywords:

Created on 2003-02-26 22:19 by akuchling, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Messages (4)
msg14864 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-02-26 22:19
Bug in 2.3a2+: 'abc' * True raises a TypeError:
unsupported operand type(s) for *: 'str' and 'bool' .

site.py does:  initial_slashes = path.startswith('/');
  path = '/'*initial_slashes + path .
This now fails.
msg14865 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2003-03-01 01:36
Logged In: YES 
user_id=80475

C:\pydev>python
I cannot reproduce the bug:

Python 2.3a2+ (#39, Feb 28 2003, 02:20:12) [MSC 
v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more 
information.
>>> 'abc' * True
'abc'
msg14866 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-03-01 02:23
Logged In: YES 
user_id=11375

Hm... puzzling.  I'll try to replicate it tomorrow, and will
close the bug if I can't.
msg14867 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-03-03 18:29
Logged In: YES 
user_id=11375

I can't replicate it, so presumably my tree got messed up at some point.
History
Date User Action Args
2022-04-10 16:07:10adminsetgithub: 38062
2003-02-26 22:19:58akuchlingcreate