作者huggie (huggie)
看板Python
标题[问题] membership test
时间Mon Mar 31 19:29:43 2008
我自订了一个 class ..里面有个 dictionary 的 member
对 dictionary inheritance 不熟,贪快所以直接用包的。
__getitem__ 可以用来做 index
我就用来 proxy (是这样称呼吗) 里面的那个 dictionary
但是 membership test 好像不能用 (例如 'xxx' in dic)
明明没有在 dictionary 里面居然 pass 了
请问要怎麽用?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.129.160.62