Created
April 27, 2010 01:16
-
-
Save cdleary/380179 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TreeContextFlags(object): | |
flag_names = ['TCF_%s' % flag for flag in """COMPILING IN_FUNCTION | |
RETURN_EXPR RETURN_VOID IN_FOR_INIT FUN_SETS_OUTER_NAME | |
FUN_PARAM_ARGUMENTS FUN_USES_ARGUMENTS FUN_HEAVYWEIGHT FUN_IS_GENERATOR | |
FUN_USES_OWN_NAME HAS_FUNCTION_STMT GENEXP_LAMBDA COMPILE_N_GO | |
NO_SCRIPT_RVAL HAS_SHARPS DECL_DESTRUCTURING NEED_MUTABLE_SCRIPT | |
STRICT_MODE_CODE FUN_PARAM_EVAL FUN_UNBRAND_THIS | |
FUN_MODULE_PATTERN""".split()] | |
for i, name in enumerate(flag_names): | |
locals()[name] = 1 << i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment