Lines Matching defs:Set
1039 type Set struct { struct
1040 ht hashtable // values are all None
1051 func (s *Set) Delete(k Value) (found bool, err error) { _, found, err = s.ht.delete(k); return }
1052 func (s *Set) Clear() error { return s.ht.clear() }
1053 func (s *Set) Has(k Value) (found bool, err error) { _, found, err = s.ht.lookup(k); return }
1054 func (s *Set) Insert(k Value) error { return s.ht.insert(k, None) }
1055 func (s *Set) Len() int { return int(s.ht.len) }
1056 func (s *Set) Iterate() Iterator { return s.ht.iterate() }
1057 func (s *Set) String() string { return toString(s) }
1058 func (s *Set) Type() string { return "set" }
1059 func (s *Set) elems() []Value { return s.ht.keys() }
1060 func (s *Set) Freeze() { s.ht.freeze() }
1061 …c (s *Set) Hash() (uint32, error) { return 0, fmt.Errorf("unhashable type: set") }
1062 func (s *Set) Truth() Bool { return s.Len() > 0 }
1064 func (s *Set) Attr(name string) (Value, error) { return builtinAttr(s, name, setMethods) }
1065 func (s *Set) AttrNames() []string { return builtinAttrNames(setMethods) }
1067 func (x *Set) CompareSameType(op syntax.Token, y_ Value, depth int) (bool, error) {
1081 func setsEqual(x, y *Set, depth int) (bool, error) {
1093 func (s *Set) Union(iter Iterator) (Value, error) {