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.
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