Re: manipulating files within 'for'

2008-09-12 Thread bearophileHUGS
Matt Nordhoff: > BTW, I could easily be wrong, but I think C behaves the same way as Python. C syntax has many traps that are much better out of modern languages like Python/D/etc. I think C has that feature because it lacks an operator for string concatenation, while both Python and D have one (

Re: manipulating files within 'for'

2008-09-12 Thread bearophileHUGS
Matt Nordhoff: > It's useful when wrapping a line. For lack of better lorem ipsum: > > whatever = some_function("Your mistake is caused by Python not " > "following one of its general rules:\n\n" > "Explicit is better than implicit.") > > You can a

Re: manipulating files within 'for'

2008-09-12 Thread Matt Nordhoff
[EMAIL PROTECTED] wrote: > Ben Keshet: >> ...wrong. I thought I should omit the comma and didn't put it. I guess >> that stating the obvious should be the first attempt with beginners like >> me. Thanks for thinking about it (it's running perfect now). > > In CLisp, Scheme etc, lists such comma

Re: manipulating files within 'for'

2008-09-12 Thread bearophileHUGS
Ben Keshet: > ...wrong. I thought I should omit the comma and didn't put it. I guess > that stating the obvious should be the first attempt with beginners like > me. Thanks for thinking about it (it's running perfect now). In CLisp, Scheme etc, lists such commas aren't necessary, but in Python

Re: manipulating files within 'for'

2008-09-12 Thread Ben Keshet
Emile van Sebille wrote: Ben Keshet wrote: Hi Pythoneers, I have a question about a code I wrote with the help of someone. The code below copy a few lines from different files into one file. It works fine as it is given here and generates the new file 'pockets.out' correctly, but says:"p

Re: manipulating files within 'for'

2008-09-12 Thread Arnaud Delobelle
On Sep 12, 6:11 pm, Ben Keshet <[EMAIL PROTECTED]> wrote: > Hi Pythoneers, > > I have a question about a code I wrote with the help of someone. The > code below copy a few lines from different files into one file. It works > fine as it is given here and generates the new file 'pockets.out' > correc

Re: manipulating files within 'for'

2008-09-12 Thread Emile van Sebille
Ben Keshet wrote: Hi Pythoneers, I have a question about a code I wrote with the help of someone. The code below copy a few lines from different files into one file. It works fine as it is given here and generates the new file 'pockets.out' correctly, but says:"py returned exit code 0". H

manipulating files within 'for'

2008-09-12 Thread Ben Keshet
Hi Pythoneers, I have a question about a code I wrote with the help of someone. The code below copy a few lines from different files into one file. It works fine as it is given here and generates the new file 'pockets.out' correctly, but says:"py returned exit code 0". However, if I add m