[Python-Dev] yield without future statement?

Thomas Wouters thomas@xs4all.net
Mon, 13 Aug 2001 22:50:43 +0200

On Mon, Aug 13, 2001 at 09:40:06AM -0400, Guido van Rossum wrote:

> On c.l.py, there's a small discussion going on the necessity of a
> future statement to enable the yield keyword.  The general opinion
> seems to be that the future statement is redundant, since previous
> uses of yield will generally result in a syntax error -- and there
> aren't very many uses of yield in the first place.  The other uses of
> future (nested scopes and division) were needed because these features
> cause *silent* failure -- but with yield, you'd have to work really
> really hard to cause a silent failure.

I'm still against -- sorry! But it isn't just about silently breaking code,
it's also about upgrade paths. I've said this before, but I don't feel
comfortable upgrading our system-wide Python version, which thousands of
users might use, without there being a clear warning that things will break.
The user might not even notice that Python was upgraded, and not understand
why the use of 'yield' as an identifier suddenly causes a syntax error. With
a release where the use of yield generates a warning, that's their own
fault. (And yes, CGI scripts dump their warnings in the Apache errorlog, but
we have our own way of dealing with that :)

Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!