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