[Python-Dev] possible CO_FUTURE_DECORATORS

Robert Brewer fumanchu at amor.org
Wed Aug 25 07:30:44 CEST 2004


[Working on the J2 patch]...

If we use a keyword, we need a __future__ and AFAICT a new
CO_FUTURE_DECORATORS flag. Should it just be 0x4000? 

#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
#define CO_FUTURE_DECORATORS    	0x4000


I'm mostly wondering why there's a big gap between CO_NOFREE and
CO_GENERATOR_ALLOWED.

Or is it a non-issue, pick-what-you-want?


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org


More information about the Python-Dev mailing list

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant