Inheritance: ICodeFormattable, IValueEquality
Esempio n. 1
0
        public int __cmp__(object other)
        {
            ClosureCell cc = other as ClosureCell;

            if (cc == null)
            {
                throw PythonOps.TypeError("cell.__cmp__(x,y) expected cell, got {0}", PythonTypeOps.GetName(other));
            }

            return(PythonOps.Compare(Value, cc.Value));
        }
Esempio n. 2
0
 public object __le__(CodeContext context, [NotNull] ClosureCell other)
 => PythonOps.RichCompare(context, Value, other.Value, PythonOperationKind.LessThanOrEqual);
Esempio n. 3
0
 public object __gt__(CodeContext context, [NotNull] ClosureCell other)
 => PythonOps.RichCompare(context, Value, other.Value, PythonOperationKind.GreaterThan);
Esempio n. 4
0
 public object __ne__(CodeContext context, [NotNone] ClosureCell other)
 => PythonOps.RichCompare(context, Value, other.Value, PythonOperationKind.NotEqual);