Наследование: ICodeFormattable, IValueEquality
Пример #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));
        }
Пример #2
0
 public object __le__(CodeContext context, [NotNull] ClosureCell other)
 => PythonOps.RichCompare(context, Value, other.Value, PythonOperationKind.LessThanOrEqual);
Пример #3
0
 public object __gt__(CodeContext context, [NotNull] ClosureCell other)
 => PythonOps.RichCompare(context, Value, other.Value, PythonOperationKind.GreaterThan);
Пример #4
0
 public object __ne__(CodeContext context, [NotNone] ClosureCell other)
 => PythonOps.RichCompare(context, Value, other.Value, PythonOperationKind.NotEqual);