2.2 <-> 2.3 surprise

R

Roman Suzi

Hi!

I really like python 2.3 but sometimes I write for 2.2 too.

New cool feature of doing:

f = open('file')
for line in f:
do_something(line)

works strange in 2.2: I can't just quit first loop and do:

for line in f:
do_some_more(line)

(I as skipping message header by first loop and processing body
the the second).

In 2.3 it works as intended! Of course, simple refacture made it one loop...



Sincerely yours, Roman Suzi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top