3 ms·
It’s really surprising how converting print from a statement to a function made repl debugging much less convenient.
by beagle3 6y ago
It’s really surprising how converting print from a statement to a function made repl debugging much less convenient.
- bonzini 6y agoHow so?
- beagle3 6y agoI can’t give a logical explanation, but after 3 years, “print(x)” in the repl is still a cognitive dissonance whereas “print x” is natural. (Doesn’t bother me in the editor, only in the repl)
- ktpsns 6y agoI don't see "print(x)" being in any way worse then "print x". If you want to save some characters, you can always just write the symbol in the REPL line: >>> x=42 >>> x 42 This already works in the standard python REPL, no need for ipython. You can literally just omit the print call/statement: >>> print("the answer to life is %d" % x, "not 0") the answer to life is 42 not 0 >>> "the answer to life is %d" % x, "not 0" ('the answer to life is 42', 'not 0')