3 ms·
I responded to this point (which was phrased as a question): You seem to be saying that 4 (3+2) should throw: TypeError: unsupported operand type(s) for : 'in
by achompas 14y ago
I responded to this point (which was phrased as a question):
You seem to be saying that 4 (3+2) should throw: TypeError: unsupported operand type(s) for : 'int' and 'tuple'???
Parent wasn't saying that at all, and I was clarifying.
- jvm 14y agoSorry to belabor the point, but this is exactly what parent was saying. > changing something like > ("foo", > "bar", > "baz") > to > ("foo") > actually breaks the code. Of course it breaks the code because the first thing is a tuple and the second is a string. He's implying that the second thing shouldn't be a string. I'm saying that's nuts.
- StavrosK 14y agoNo, he's saying that the operation you perform to truncate the former to the latter is the operation you would logically expect to perform (i.e. removing the trailing comma), which makes the thing a string. He's not actually proposing that a string be a tuple. He's just saying that a single element enclosed in parentheses doesn't work the way you'd expect it.