public object RichNotEquals(object other) { PythonWeakRefProxy wrp = other as PythonWeakRefProxy; if (wrp != null) { return(Ops.Bool2Object(!Ops.EqualRetBool(GetObject(), wrp.GetObject()))); } return(Ops.NotEqual(GetObject(), other)); }
public static object Proxy(object @object, object callback) { object callable; if ((@object is ICallable) || Ops.TryGetAttr(@object, SymbolTable.Call, out callable)) { return(PythonCallableWeakRefProxy.MakeNew(@object, callback)); } else { return(PythonWeakRefProxy.MakeNew(@object, callback)); } }