4 ms·
That usage doesn't get the weirdly specific error message though. It's only the Python2-ish statement that gets one.
by eequah9L 8y ago
That usage doesn't get the weirdly specific error message though. It's only the Python2-ish statement that gets one.
- pseudalopex 8y agoWhat does someone want "print foo" to do if "print" is a different function? What does someone want "print (1, 2)" to do if "print" is the built-in function? It prints a tuple in Python 2 and ints in Python 3.
- eequah9L 8y agoI get that. So the Python 3 interpreter has to assume that when I say "print (1, 2)", I actually mean, print these two individual arguments. If I say "print 'foo'" though, it recommends "print ('foo')", but doesn't go all the way to assume I actually meant that. There's a piece of code handling that special case that stops short of actually interpreting what I apparently mean. The frustration around that was the original point.