01: package org.python.core;
02:
03: public class CompilerFlags {
04:
05: public CompilerFlags() {
06: }
07:
08: public CompilerFlags(int co_flags) {
09: if ((co_flags & org.python.core.PyTableCode.CO_NESTED) != 0) {
10: this .nested_scopes = true;
11: }
12: if ((co_flags & org.python.core.PyTableCode.CO_FUTUREDIVISION) != 0) {
13: this .division = true;
14: }
15: if ((co_flags & org.python.core.PyTableCode.CO_GENERATOR_ALLOWED) != 0) {
16: this .generator_allowed = true;
17: }
18: }
19:
20: public String toString() {
21: return "CompilerFlags[division=" + division + " nested_scopes="
22: + nested_scopes + " generators=" + generator_allowed
23: + "]";
24: }
25:
26: public boolean nested_scopes = true;
27: public boolean division;
28: public boolean generator_allowed;
29:
30: public String encoding;
31: }
|