do python's nifty indentation rules spell the death of one-liners?
Grant Edwards
grante at visi.com
Thu Apr 17 11:43:55 EDT 2003
In article <KEzna.115586$It5.56408 at news2.central.cox.net>, Steve Holden wrote:
>> > Now try putting an import before the "for" statement ...
>>
>> echo -e 'import sys\nfor i in range(5):\n sys.stdout.write(str(i)+"\\n")\n\n' | python2
>>
>> Works for me. Was it supposed to fail?
>
> We=ll, you might say I was just too lazy to test it for myself :-)
I couldn't figure out how to get a % in there, but I only tried
for about 30 seconds. There are apparently bits of the shell
quoting syntax/semantics that I still don't understand after 20
years of using Unix...
--
Grant Edwards grante Yow! I need "RONDO".
at
visi.com
More information about the Python-list
mailing list