Re: [Tutor] summer_v04.py

2007-02-21 Thread Kent Johnson
Christopher Spears wrote: > I've been working on a version of a script I found in > "Programming Python". The helpful users of this forum > gave me some advice to make the code less wordy. Here > is the code: > > #!/usr/bin/python > import string > > def find_longest_line(fileName): > lin

Re: [Tutor] summer_v04.py

2007-02-21 Thread Kent Johnson
Rikard Bosnjakovic wrote: > On 2/21/07, John Fouhy <[EMAIL PROTECTED]> wrote: > >> (because you are using a generator expression, and they were only >> introduced in 2.4) > > List comprehensions were implemented in v2.0. The OP probably does not > use an older version, but as far as I can see, hi

Re: [Tutor] summer_v04.py

2007-02-20 Thread Rikard Bosnjakovic
On 2/21/07, John Fouhy <[EMAIL PROTECTED]> wrote: > (because you are using a generator expression, and they were only > introduced in 2.4) List comprehensions were implemented in v2.0. The OP probably does not use an older version, but as far as I can see, his syntax error line uses parenthesis -

Re: [Tutor] summer_v04.py

2007-02-20 Thread John Fouhy
On 21/02/07, Christopher Spears <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] ./text_proc 151> ./summer_v04.py > table.txt > File "./summer_v04.py", line 6 > numCols = max(len(cols) for cols in line_list) > ^ > SyntaxError: invalid syntax What version of python