コード例 #1
0
ファイル: Set.cs プロジェクト: zzkongfu/ironpython3
        public void remove(object item)
        {
            bool   res;
            object hashableItem = item;

            if (SetStorage.GetHashableSetIfSet(ref hashableItem))
            {
                res = _items.Remove(hashableItem);
            }
            else
            {
                res = _items.RemoveAlwaysHash(hashableItem);
            }

            if (!res)
            {
                throw PythonOps.KeyError(item);
            }
        }