[Jython-checkins] jython: Add sys.flags.optimize (always =0 for CPython compatibility)
frank.wierzbicki
jython-checkins at python.org
Wed Mar 14 04:09:32 CET 2012
http://hg.python.org/jython/rev/9e9f72d78bd6
changeset: 6346:9e9f72d78bd6
user: Jim Baker <jbaker at zyasoft.com>
date: Tue Mar 13 15:23:09 2012 -0700
summary:
Add sys.flags.optimize (always =0 for CPython compatibility)
files:
src/org/python/core/Options.java | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/org/python/core/Options.java b/src/org/python/core/Options.java
--- a/src/org/python/core/Options.java
+++ b/src/org/python/core/Options.java
@@ -85,6 +85,10 @@
//XXX: place holder
public static int bytes_warning = 0;
+ // Corresponds to -O (Python bytecode optimization), -OO (remove docstrings)
+ // flags in CPython; it's not clear how Jython should expose its optimization,
+ // but this is user visible as of 2.7.
+ public static int optimize = 0;
/**
* Enable division warning. The value maps to the registry values of
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list