[Python-Dev] PEP 342 suggestion: start(), call() and unwind_call() methods (original) (raw)

Phillip J. Eby pje at telecommunity.com
Fri Oct 7 19:51:15 CEST 2005


At 09:50 PM 10/7/2005 +1000, Nick Coghlan wrote:

Notice how a non-coroutine callable can be yielded, and it will still work happily with the scheduler, because the desire to continue execution is indicated by the ContinueIteration exception, rather than by the type of the returned value.

Whaaaa? You raise an exception to indicate the normal case? That seems, um... well, a Very Bad Idea.

I also don't see any point to start(), or understand what finish() does or why you'd want it.

Last, but far from least, as far as I can tell you can implement all of these semantics using PEP 342 as it sits. That is, it's very simple to make decorators or classes that add those semantics. I don't see anything that requires them to be part of Python.



More information about the Python-Dev mailing list