예제 #1
0
        public override bool Equals(object obj)
        {
            var asTuple = obj as PyTuple;

            if (asTuple == null)
            {
                return(false);
            }
            else
            {
                return(PyTupleClass.__eq__(this, asTuple).InternalValue);
            }
        }
예제 #2
0
        public static object __next__(PyObject self)
        {
            var asIterator = self as PyTupleIterator;

            if (asIterator.CurrentIdx >= asIterator.IteratedTuple.Values.Length)
            {
                throw new StopIterationException();
            }
            else
            {
                asIterator.CurrentIdx += 1;
                return(PyTupleClass.__getitem__(asIterator.IteratedTuple, asIterator.CurrentIdx - 1));
            }
        }