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/032894.html below:

[Python-Dev] thunks

[Python-Dev] thunks [Python-Dev] thunksSamuele Pedroni pedronis@bluewin.ch
Tue, 4 Feb 2003 04:07:56 +0100
From: "Guido van Rossum" <guido@python.org>
>
> Thunk blending in:
>
>   [<variable> =] <expression>:
>     <block>
>

these need use cases that go beyond what 'with' can do.

If multiple execution of the thunk is allowed and control over break, one usage
would be:

loop:
 <block> # can contain break/continue

instead of:

while 1:
  <block>


Another, if in a program one uses often the if some_cond, e.g.

if ctl.mode == INTERACTIVE:
  <block>

if ctl.mode != INTERACTIVE:
  <block>

one could define:

interactive:
 <block>

notinteractive:
  <block>

...




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