2 ms·
This use case is part of why I'm so disappointed in some python 3 changes. 2 was definitely more suitable for a newcomer experimenting in a REPL by virtue of it
by jimmaswell 6y ago
This use case is part of why I'm so disappointed in some python 3 changes. 2 was definitely more suitable for a newcomer experimenting in a REPL by virtue of its greater simplicity and intuitiveness.
- beagle3 6y agoIt’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')