internal static void Push(object o1, object o2) { Stack<object> infinite = GetInfiniteCmp(); TwoObjects to = new TwoObjects(o1, o2); if (infinite.Contains(to)) { throw PythonOps.RuntimeError("maximum recursion depth exceeded in cmp"); } CmpStack.Push(to); }
public override bool Equals(object other) { TwoObjects o = other as TwoObjects; if (o == null) { return(false); } return(o.obj1 == obj1 && o.obj2 == obj2); }
internal static void Push(object o1, object o2) { Stack <object> infinite = GetInfiniteCmp(); TwoObjects to = new TwoObjects(o1, o2); if (infinite.Contains(to)) { throw PythonOps.RuntimeError("maximum recursion depth exceeded in cmp"); } CmpStack.Push(to); }