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

[Python-Dev] Re: anonymous blocks

[Python-Dev] Re: anonymous blocks [Python-Dev] Re: anonymous blocksPhillip J. Eby pje at telecommunity.com
Wed Apr 27 17:01:27 CEST 2005
At 12:30 AM 4/27/05 -0700, Guido van Rossum wrote:
>I've written a PEP about this topic. It's PEP 340: Anonymous Block
>Statements (http://python.org/peps/pep-0340.html).
>
>Some highlights:
>
>- temporarily sidestepping the syntax by proposing 'block' instead of 'with'
>- __next__() argument simplified to StopIteration or ContinueIteration 
>instance
>- use "continue EXPR" to pass a value to the generator
>- generator exception handling explained

Very nice.  It's not clear from the text, btw, if normal exceptions can be 
passed into __next__, and if so, whether they can include a traceback.  If 
they *can*, then generators can also be considered co-routines now, in 
which case it might make sense to call blocks "coroutine blocks", because 
they're basically a way to interleave a block of code with the execution of 
a specified coroutine.

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