Commits

Lukas Diekmann committed a7633eb

use string strategy when appending string to empty set

Comments (0)

Files changed (1)

pypy/objspace/std/setobject.py

     def add(self, w_set, w_key):
         if type(w_key) is W_IntObject:
             strategy = self.space.fromcache(IntegerSetStrategy)
+        elif type(w_key) is W_StringObject:
+            strategy = self.space.fromcache(StringSetStrategy)
         else:
             strategy = self.space.fromcache(ObjectSetStrategy)
         w_set.strategy = strategy