On 29 December 2010 15:20, Antoine Pitrou <solipsis@pitrou.net> wrote:
On Wed, 29 Dec 2010 16:13:15 +0100 Georg Brandl <g.brandl@gmx.net> wrote:
Am 29.12.2010 14:36, schrieb Michael Foord:
Hello all,
I often use python as a calculator or for simple operations using -c. It would be enormously useful if python -c "..." would output on stdout the result of the last evaluated expression in the same way that the interactive interpreter does.
If it did, you couldn't do this anymore (with the obvious implementation):
python -c 'print 1 print 2'
which I guess a few people do rely upon.
A new -e option would be fine, but -- YAGNI?
Apparently, MIGNI.
Hah. :-) And PIGNI. Michael
_______________________________________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas
-- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html