Пример #1
0
        public override bool Equals(object obj)
        {
            var asList = obj as PyDict;

            if (asList == null)
            {
                return(false);
            }
            else
            {
                return(PyDictClass.__eq__(this, asList).boolean);
            }
        }
Пример #2
0
        public static object __next__(PyObject self)
        {
            var asKeyIterator = self as PyDictItemsIterator;

            if (!asKeyIterator.Keys.MoveNext())
            {
                throw new StopIterationException();
            }
            else
            {
                var key = (object)asKeyIterator.Keys.Current;
                return(PyTuple.Create(new object[] { key, PyDictClass.__getitem__(asKeyIterator.Dict, key) }));
            }
        }