[Python-ideas] python -c "..." should output result like the interpreter

Cameron Simpson cs at zip.com.au
Thu Dec 30 06:53:32 CET 2010


On 29Dec2010 10:27, Fred Drake <fdrake at acm.org> wrote:
| On Wed, Dec 29, 2010 at 9:40 AM, Paul Moore <p.f.moore at gmail.com> wrote:
| > I like the idea, but that's a fairly big semantic change. What about
| > adding an -e option that takes an expression, and prints its value?
| 
| +1
| 
| Changing -c would be unacceptable.

Likewise.

My -1 on having -c output the final value is as for the shell:
does "sh -c sh-cmd" have an implied echo? No, and lucky we are that it
does not.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it. - Brian W. Kernighan



More information about the Python-ideas mailing list