471,073 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

2.2 <-> 2.3 surprise


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
--
rn*@onego.ru =\= My AI powered by GNU/Linux RedHat 7.3

Jul 18 '05 #1
0 997

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Jonny T | last post: by
7 posts views Thread by haoren | last post: by
3 posts views Thread by winderjj | last post: by
4 posts views Thread by matatu | last post: by
4 posts views Thread by higabe | last post: by
4 posts views Thread by Armel Asselin | last post: by
3 posts views Thread by webmasterATflymagnetic.com | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.