PEP 318

Stephen Horne steve at ninereeds.fsnet.co.uk
Mon Mar 22 05:48:51 EST 2004


On 21 Mar 2004 23:03:24 -0800, Paul Rubin
<http://phr.cx@NOSPAM.invalid> wrote:

>The syntax can be extended, i.e. "def foo() as generator" looks to me
>to be a lot more explicit than "def foo()" followed by having the
>compiler search the function body for a yield statement in order
>to decide if it's a generator.

Good point. Though to me, it isn't that it's a pain for the compiler
to search for the 'yield' - I don't care about the compilers pain. The
problem is that *I* have to look for the yield and might not notice
it.


-- 
Steve Horne

steve at ninereeds dot fsnet dot co dot uk



More information about the Python-list mailing list