--- /org/python/core/PyInteger.java Tue Dec 5 23:58:32 2006 +++ PyInteger.java Mon Jan 15 10:26:11 2007 @@ -1487,7 +1487,10 @@ final PyObject int___truediv__(PyObject right) { if (right instanceof PyInteger) return __float__().__truediv__(right); - return null; + else if(right instanceof PyLong) + return Py.newLong(getValue()).__truediv__(right); + else + return null; } public PyObject __rtruediv__(PyObject left) { @@ -1497,7 +1500,10 @@ final PyObject int___rtruediv__(PyObject left) { if (left instanceof PyInteger) return left.__float__().__truediv__(this); - return null; + else if(left instanceof PyLong) + return left.__truediv__(Py.newLong(getValue())); + else + return null; } private static int modulo(int x, int y, int xdivy) { @@ -1642,6 +1648,8 @@ int rightv; if (right instanceof PyInteger) rightv = ((PyInteger)right).getValue(); + else if(right instanceof PyLong) + return Py.newLong(getValue()).__lshift__(right); else return null; @@ -1660,6 +1668,8 @@ int rightv; if (right instanceof PyInteger) rightv = ((PyInteger)right).getValue(); + else if(right instanceof PyLong) + return Py.newLong(getValue()).__rshift__(right); else return null; @@ -1677,6 +1687,8 @@ int rightv; if (right instanceof PyInteger) rightv = ((PyInteger)right).getValue(); + else if(right instanceof PyLong) + return Py.newLong(getValue()).__and__(right); else return null; @@ -1691,6 +1703,8 @@ int rightv; if (right instanceof PyInteger) rightv = ((PyInteger)right).getValue(); + else if(right instanceof PyLong) + return Py.newLong(getValue()).__xor__(right); else return null; @@ -1705,6 +1719,8 @@ int rightv; if (right instanceof PyInteger) rightv = ((PyInteger)right).getValue(); + else if(right instanceof PyLong) + return Py.newLong(getValue()).__or__(right); else return null;