import System.Collections.Generic as Cdef test_contains():l = C.List[int]()l.Add(42)assert 42 in lassert 43 not in ldef test_dict_items():d = C.Dictionary[int, str]()d[42] = "a"items = d.items()assert len(items) == 1k,v = items[0]assert k == 42assert v == "a"# regression test for https://github.com/pythonnet/pythonnet/issues/1785def test_dict_in_keys():d = C.Dictionary[str, int]()d["a"] = 42assert "a" in d.Keysassert "b" not in d.Keys
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。