看板 Python 關於我們 聯絡資訊
我自訂了一個 class ..裡面有個 dictionary 的 member 對 dictionary inheritance 不熟,貪快所以直接用包的。 __getitem__ 可以用來做 index 我就用來 proxy (是這樣稱呼嗎) 裡面的那個 dictionary 但是 membership test 好像不能用 (例如 'xxx' in dic) 明明沒有在 dictionary 裡面居然 pass 了 請問要怎麼用? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.129.160.62