Inheritance: ICodeFormattable, IValueEquality
Example #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));
        }
Example #2
0
 public object __le__(CodeContext context, [NotNull] ClosureCell other)
 => PythonOps.RichCompare(context, Value, other.Value, PythonOperationKind.LessThanOrEqual);
Example #3
0
 public object __gt__(CodeContext context, [NotNull] ClosureCell other)
 => PythonOps.RichCompare(context, Value, other.Value, PythonOperationKind.GreaterThan);
Example #4
0
 public object __ne__(CodeContext context, [NotNone] ClosureCell other)
 => PythonOps.RichCompare(context, Value, other.Value, PythonOperationKind.NotEqual);