Exemple #1
0
        public override bool Equals(object obj)
        {
            switch (obj)
            {
            case PythonObject other:
                return(self.Equals(other.self));

            case PyObject other:
                return(self.Equals(other));
            }
            return(base.Equals(obj));
        }
Exemple #2
0
        }                            // required for some constructors

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            switch (obj)
            {
            case PythonObject other:
                return(self.Equals(other.self));

            case PyObject other:
                return(self.Equals(other));
            }
            return(base.Equals(obj));
        }
Exemple #3
0
 public bool CanDecode(PyObject objectType, Type targetType)
 => this.CanEncode(targetType) && objectType.Equals(PythonEngine.Eval("ValueError"));