end of print = lower productivity ?
alex23
wuwei23 at gmail.com
Mon Dec 1 20:09:26 EST 2008
On Dec 2, 5:12 am, Alan G Isaac <ais... at american.edu> wrote:
> One obvious cost is that working at the
> interpreter prompt is now slightly less
> convenient.
Not if you use IPython:
IPython 0.8.1 -- An enhanced Interactive Python.
? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: def prnt(x): print x
...:
In [2]: prnt "test"
------> prnt("test")
test
In [3]: prnt 1+1
------> prnt(1+1)
2
> My preferred transition would have been to
> retain the `print` statement but add a `printf`
> function (i.e., the new `print` function).
> Presumably many would find this a repulsive
> redundancy and a needless maintenance headache.
Not to mention the endless "Which should I use, print or print()?"
questions this list would get.
More information about the Python-list
mailing list