看板 [ Python ]
討論串[問題] membership test
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者huggie (huggie)時間17年前 (2008/03/31 19:29), 編輯資訊
1
0
0
內容預覽:
我自訂了一個 class ..裡面有個 dictionary 的 member. 對 dictionary inheritance 不熟,貪快所以直接用包的。. __getitem__ 可以用來做 index. 我就用來 proxy (是這樣稱呼嗎) 裡面的那個 dictionary. 但是 mem

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者chmate ([][][])時間17年前 (2008/03/31 22:31), 編輯資訊
0
0
1
內容預覽:
http://docs.python.org/ref/comparisons.html. For user-defined classes which define the __contains__() method, x in y is. true if and only if y.__conta
首頁
上一頁
1
下一頁
尾頁