Hello All, Obviously I wasn't clear. :-( The problem I want to address is that continue and break always refer to the innermost loop they're in. However, it may be desirable to name the loop and then continue/break explictly this loop. (A know bug is that sometime a new loop is added in the middle and then the break statement breaks the new loop and not the old one). I'd like to see something like (I'm sure you find a nicer syntax than this, and a better example :-): import re def process_file(): lines = [] while1: # name code block while (1): for line in open('somefile').readlines(): if (re.match('EOF', line): # end of file marker, don't continue break while1 # break outer while loop lines.append(line) return filter(lambda x: re.match('>', line) Bye. ---------------------------------------------------------------------------- -- Smile, damn it, smile. lambda msg: 'name' : 'Miki Tebeka', 'email' : 'tebeka at lycosmail.com', 'homepage' : 'www.tebeka.freeservers.com', 'quote' : "I don't suffer from insanity, I enjoy every minute of it." }[msg]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4