Shane Hathaway wrote: > Here is example A, a non-looping block statement using "try": > > text = 'diamond' > for fn in filenames: > try opening(fn) as f: > if text in f.read(): > print 'I found the text in %s' % fn > break
That's a pretty way to write it! Would it be possible to extend the 'try' syntax in this way? It would certainly stress the fact that this construct includes exception handling. --eric _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com