Ejemplo n.º 1
0
 public void __delete__(PyObject obj) {
   PyType self_type = getType();
   PyObject impl = self_type.lookup("__delete__");
   if (impl != null) {
     impl.__get__(this, self_type).__call__(obj);
     return;
   }
   super.__delete__(obj);
 }
Ejemplo n.º 2
0
 public void __delitem__(PyObject key) { // ???
   PyType self_type = getType();
   PyObject impl = self_type.lookup("__delitem__");
   if (impl != null) {
     impl.__get__(this, self_type).__call__(key);
     return;
   }
   super.__delitem__(key);
 }
Ejemplo n.º 3
0
 public void __delattr__(String name) {
   PyType self_type = getType();
   PyObject impl = self_type.lookup("__delattr__");
   if (impl != null) {
     impl.__get__(this, self_type).__call__(PyString.fromInterned(name));
     return;
   }
   super.__delattr__(name);
 }
Ejemplo n.º 4
0
 public void __delslice__(PyObject start, PyObject stop, PyObject step) {
   if (step != null) {
     __delitem__(new PySlice(start, stop, step));
     return;
   }
   PyType self_type = getType();
   PyObject impl = self_type.lookup("__delslice__");
   if (impl != null) {
     PyObject[] indices = PySlice.indices2(this, start, stop);
     impl.__get__(this, self_type).__call__(indices[0], indices[1]);
     return;
   }
   super.__delslice__(start, stop, step);
 }