4 ms·
Not directly, it wasn’t: >>> open('foo') * 3 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand ty
by kstrauser 1y ago
Not directly, it wasn’t:
>>> open('foo') * 3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for *: '_io.TextIOWrapper' and 'int'
You have to go to some length to get Python to mix types so badly.
- Orygin 1y agoWon't prevent you from shipping this in prod. The stack trace you shown only appearing when you execute the code.