A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-May/053771.html below:

[Python-Dev] PEP 343 - Abstract Block Redux

[Python-Dev] PEP 343 - Abstract Block Redux [Python-Dev] PEP 343 - Abstract Block ReduxEric Nieuwland eric.nieuwland at xs4all.nl
Sun May 15 11:12:58 CEST 2005
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

More information about the Python-Dev mailing list

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