Esempio n. 1
0
 private static void castOperands(PyObject self, PyObject other, out PyString selfOut, out PyString otherOut, string operation)
 {
     selfOut  = self as PyString;
     otherOut = other as PyString;
     if (selfOut == null)
     {
         throw new Exception("Tried to use a non-PyString for lvalue of: " + operation);
     }
     if (otherOut == null)
     {
         throw new Exception("Tried to use a non-PyString for rvalue of: " + operation);
     }
 }
Esempio n. 2
0
 public static new PyString __repr__(PyObject self)
 {
     return(PyString.Create(((PyString)self).ToString()));
 }