[Python-checkins] r42501 - python/trunk/Include/code.h
Tim Peters
tim.peters at gmail.com
Sun Feb 19 21:17:01 CET 2006
> Author: neal.norwitz
> Date: Sun Feb 19 19:49:30 2006
> New Revision: 42501
>
> Modified:
> python/trunk/Include/code.h
> Log:
> Generators have been permanent for a while. This comment is no longer applicable.
>
> Modified: python/trunk/Include/code.h
> ==============================================================================
> --- python/trunk/Include/code.h (original)
> +++ python/trunk/Include/code.h Sun Feb 19 19:49:30 2006
> @@ -39,12 +39,7 @@
> call frame it setup.
> */
> #define CO_NOFREE 0x0040
> -/* XXX Temporary hack. Until generators are a permanent part of the
> - language, we need a way for a code object to record that generators
> - were *possible* when it was compiled. This is so code dynamically
> - compiled *by* a code object knows whether to allow yield stmts. In
> - effect, this passes on the "from __future__ import generators" state
> - in effect when the code block was compiled. */
> +
> #define CO_GENERATOR_ALLOWED 0x1000 /* no longer used in an essential way */
> #define CO_FUTURE_DIVISION 0x2000
Umm, looks like you removed the comment but left the hack. If you're
not going to remove CO_GENERATOR_ALLOWED too, it would be better to
leave the comment, so that CO_GENERATOR_ALLOWED isn't a total mystery.
More information about the Python-checkins
mailing list