Example #1
0
        public override bool Equals(object obj)
        {
            var asList = obj as PyList;

            if (asList == null)
            {
                return(false);
            }
            else
            {
                return(PyListClass.__eq__(this, asList).InternalValue);
            }
        }
Example #2
0
        public static object __next__(PyObject self)
        {
            var asIterator = self as PyListIterator;

            if (asIterator.CurrentIdx >= asIterator.IteratedList.list.Count)
            {
                throw new StopIterationException();
            }
            else
            {
                asIterator.CurrentIdx += 1;
                return(PyListClass.__getitem__(asIterator.IteratedList, asIterator.CurrentIdx - 1));
            }
        }