示例#1
0
文件: PyDict.cs 项目: bamyazi/cloaca
        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) }));
            }
        }