operator at for dict
This commit is contained in:
@@ -160,6 +160,17 @@ func (dict *DictType) GetItem(key any) (value any, exists bool) {
|
||||
return
|
||||
}
|
||||
|
||||
func (dict *DictType) FindKey(item any) (key any, exists bool) {
|
||||
for k, v := range *dict {
|
||||
if kern.Equal(v, item) {
|
||||
key = k
|
||||
exists = true
|
||||
break
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (dict *DictType) Clone() kern.Cloner {
|
||||
c := newDict(nil)
|
||||
for k, v := range *dict {
|
||||
|
||||
Reference in New Issue
Block a user