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/2003-February/032758.html below:

[Python-Dev] Extended Function syntax

[Python-Dev] Extended Function syntax [Python-Dev] Extended Function syntaxSamuele Pedroni pedronis@bluewin.ch
Sun, 2 Feb 2003 23:14:41 +0100
From: "Brett Cannon" <bac@OCF.Berkeley.EDU>
>
> Wouldn't this also allow one to code in a contract programming style ala
> Icon (assuming I remember correctly how contract programming works)?  I
> mean you have control over the enter and exit of the thunk (would this
> still be called a thunk, or just syntactic sugar for calling
> ``__exit__()`` and ``__enter__()``; more like a thunk-ish protocol?) which
> is what I thought was the focus of contract programming.
>
> Either way this seems rather nice.  And if you can pass in arguments (as I
> think ``FILE = file('blah.txt', 'rb'): (some_argument):`` is supposed to
> implement) this would be really nice.  =)

no there is no first-class thunk here, this is really just sugar for a
try-finally. The point here is not to need first-class thunks!





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