Update of /cvsroot/jython/jython/org/python/modules
In directory usw-pr-cvs1:/tmp/cvs-serv24200/modules
Modified Files:
codeop.java
Log Message:
** nested scopes (2) **
completes nested scopes support in interpreter:
now nested scopes semantic settings are inherited
trough exec, execfile, etc ...
plus: assert now correctly get __debug__ as a global
Index: codeop.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/modules/codeop.java,v
retrieving revision 2.3
retrieving revision 2.4
diff -C2 -r2.3 -r2.4
*** codeop.java 2001/03/13 20:27:18 2.3
--- codeop.java 2001/05/27 18:49:15 2.4
***************
*** 4,12 ****
import org.python.core.*;
! public class codeop {
public static PyString __doc__ = new PyString(
"Utility to compile possibly incomplete Python source code.\n"
);
public static PyList __all__ = new PyList(new PyString[] {
new PyString("compile_command")
--- 4,18 ----
import org.python.core.*;
! public class codeop implements ClassDictInit {
public static PyString __doc__ = new PyString(
"Utility to compile possibly incomplete Python source code.\n"
);
+ public static void classDictInit(PyObject dict)
+ {
+ dict.__delitem__("compile_command_flags");
+ dict.__delitem__("classInitDict");
+ }
+
public static PyList __all__ = new PyList(new PyString[] {
new PyString("compile_command")
***************
*** 24,27 ****
--- 30,38 ----
String kind)
{
+ return compile_command_flags(string,filename,kind,null);
+ }
+
+ public static PyObject compile_command_flags(String string,String filename,String kind,CompilerFlags cflags)
+ {
org.python.parser.SimpleNode node =
parser.partialParse(string+"\n", kind, filename);
***************
*** 29,33 ****
if (node == null)
return Py.None;
! return Py.compile(node, Py.getName(), filename, true, true);
}
}
--- 40,45 ----
if (node == null)
return Py.None;
! return Py.compile_flags(node, Py.getName(), filename, true, true,cflags);
}
+
}
|