At 06:49 26.08.2003 -0700, Neil Schemenauer wrote: >Samuele Pedroni wrote: > > This PEP proposes that generators should grow such a close method > > with such semantics that the example could be rewritten as: > > > > def all_lines(index_path): > > index = file(index_path,"r") > > try: > > for path in file(index_path,"r"): > ^^^^^^^^^^^^^^^^^^^^ > > document = file(path.strip(),"r") > > try: > > for line in document: > > yield line > > finally: > > document.close() > > finally: > > index.close() > >I think that should be 'index'. yup, thanks.
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