(why) inconsistent yield/return syntax?

Mark McEahern marklists at mceahern.com
Mon Feb 10 15:42:53 EST 2003


[Gerrit Holl]
> > Read up on generators.  Google is your friend.
>
> I have.
> If if wouldn't have done that, it would be:
>
>   1 >>> def f(): yield
>   <stdin>:1: Warning: 'yield' will become a reserved keyword in the future
>
> But it was:
>  46 >>> def f(): yield
>    File "<stdin>", line 1
>        def f(): yield

That leaves me wondering what your question is then.

Cheers,

// m

-






More information about the Python-list mailing list